Downloads · 30 days
0
PrinceParvez/customer-support-ai
customer-support-ai is a text classification model from PrinceParvez. Use it when you need a label for a piece of text. It is set up for scikit-learn. The card lists the license as mit.
A machine learning model for classifying banking customer-support messages into their corresponding customer intent.
Downloads · 30 days
0
Access
Public
Updated Aug 23, 2026
Repo size
13.6 MB
Likes
0
Public
Click a slice to open those files.
.pkl13.6 MB · 100%
From the Hugging Face model README
A machine learning model for classifying banking customer-support messages into their corresponding customer intent.
This project demonstrates a complete machine-learning workflow, including dataset inspection, data cleaning, train/validation/test splitting, model training, evaluation, error analysis, and prediction.
Customer-support systems receive a large number of messages every day. Automatically identifying the intent behind each message can help route customer queries to the correct support workflow.
This model takes a customer's message as input and predicts one of 77 banking-related customer-support intents.
Input:
My card hasn't arrived yet
Prediction:
card_arrival
Another example:
Input:
I want to cancel my transfer
Prediction:
cancel_transfer
Text Classification / Customer Intent Classification
The model performs multi-class classification on customer-support messages.
A natural-language customer-support message.
One of 77 predefined banking customer-support intents.
The model was trained using the Banking77 dataset.
Banking77 contains banking-related customer queries categorized into 77 different intents.
The dataset was processed through the following pipeline:
Raw Dataset
↓
Dataset Inspection
↓
Data Cleaning
↓
Train / Validation / Test Split
↓
Model Training
↓
Validation Evaluation
↓
Error Analysis
↓
Final Test Evaluation
The trained model is a scikit-learn text-classification model saved using joblib.
Model file:
customer_support_model.pkl
The model can be loaded in Python using:
import joblib
model = joblib.load("customer_support_model.pkl")
prediction = model.predict([
"My card hasn't arrived yet"
])
print(prediction)
Expected output:
['card_arrival']
The model was evaluated using separate validation and test datasets.
Validation records:
1,000
Validation accuracy:
83.90%
Test records:
1,000
Test accuracy:
84.70%
Additional test metrics:
| Metric | Score |
|---|---|
| Accuracy | 84.70% |
| Macro F1 | 0.85 |
| Weighted F1 | 0.85 |
The final test evaluation was performed on data that was not used during model training.
Error analysis was performed on the validation dataset to understand where the model makes incorrect predictions.
Validation records: 1,000
Correct predictions: 839
Incorrect predictions: 161
Error rate: 16.10%
The analysis showed that some errors occur between semantically similar customer-support intents.
For example, messages involving:
can sometimes contain similar language, making them harder to classify.
The project includes an error-analysis script that generates:
reports/validation_predictions.csv
The model supports 77 banking customer-support intents, including:
Refund_not_showing_up
activate_my_card
age_limit
apple_pay_or_google_pay
atm_support
automatic_top_up
balance_not_updated_after_bank_transfer
balance_not_updated_after_cheque_or_cash_deposit
beneficiary_not_allowed
cancel_transfer
card_about_to_expire
card_acceptance
card_arrival
card_delivery_estimate
card_linking
card_not_working
card_payment_fee_charged
card_payment_not_recognised
card_payment_wrong_exchange_rate
card_swallowed
cash_withdrawal_charge
cash_withdrawal_not_recognised
change_pin
compromised_card
contactless_not_working
country_support
declined_card_payment
declined_cash_withdrawal
declined_transfer
direct_debit_payment_not_recognised
disposable_card_limits
edit_personal_details
exchange_charge
exchange_rate
exchange_via_app
extra_charge_on_statement
failed_transfer
fiat_currency_support
get_disposable_virtual_card
get_physical_card
getting_spare_card
getting_virtual_card
lost_or_stolen_card
lost_or_stolen_phone
order_physical_card
passcode_forgotten
pending_card_payment
pending_cash_withdrawal
pending_top_up
pending_transfer
pin_blocked
receiving_money
request_refund
reverted_card_payment?
supported_cards_and_currencies
terminate_account
top_up_by_bank_transfer_charge
top_up_by_card_charge
top_up_by_cash_or_cheque
top_up_failed
top_up_limits
top_up_reverted
topping_up_by_card
transaction_charged_twice
transfer_fee_charged
transfer_into_account
transfer_not_received_by_recipient
transfer_timing
unable_to_verify_identity
verify_my_identity
verify_source_of_funds
verify_top_up
virtual_card_not_working
visa_or_mastercard
why_verify_identity
wrong_amount_of_cash_received
wrong_exchange_rate_for_cash_withdrawal
The complete project contains:
customer-support-annotation/
│
├── annotation/
│
├── data/
│ ├── raw/
│ │ └── train.csv
│ │
│ └── processed/
│ ├── cleaned_train.csv
│ ├── train.csv
│ ├── validation.csv
│ └── test.csv
│
├── models/
│ └── customer_support_model.pkl
│
├── reports/
│ └── validation_predictions.csv
│
├── scripts/
│ ├── clean_dataset.py
│ ├── error_analysis.py
│ ├── evaluate_model.py
│ ├── inspect_dataset.py
│ ├── predict.py
│ ├── split_dataset.py
│ ├── test_model.py
│ └── train_model.py
│
├── app.py
├── requirements.txt
└── README.md
The project includes an interactive prediction script.
Run:
python scripts/predict.py
Example:
===== CUSTOMER SUPPORT AI =====
Type 'exit' to stop.
Customer message: My card hasn't arrived yet
Predicted Intent: card_arrival
The model is also integrated into a web application that allows users to enter customer-support messages and receive predicted intents.
Live Demo:
Add your Streamlit application URL here.
[https://customer-support-ai-gkmuxmcdqfjcwk3q6tpidm.streamlit.app/]
Clone the project:
git clone https://github.com/princechouhan3/customer-support-ai.git
cd customer-support-annotation
Install dependencies:
pip install -r requirements.txt
Run the prediction application:
python scripts/predict.py
The complete source code, training scripts, evaluation scripts, dataset-processing pipeline, and application code are available on GitHub.
GitHub Repository:
https://github.com/princechouhan3/customer-support-ai
This type of intent-classification model can be used as a component of:
The model itself is a classification component and can be integrated into a larger customer-support or chatbot system.
This model was trained and evaluated using the Banking77 dataset.
Its performance on real-world customer messages may differ from the reported test performance.
The model should not be used as a production banking decision system without additional:
The model is intended primarily as a machine-learning project and portfolio demonstration.
Possible future improvements include:
Customer Support AI — Banking Intent Classification
This project demonstrates an end-to-end machine-learning workflow from raw customer-support data to a trained and evaluated classification model and an interactive prediction application.
This project is released under the MIT License.