An industry-grade Machine Learning application that automatically classifies incoming customer support tickets into 11 distinct categories and predicts their priority (High, Medium, Low) to streamline enterprise helpdesk operations.
In large organizations, support agents spend countless hours manually triaging tickets. This causes bottlenecks, delayed responses to critical bugs, and SLA breaches. This project automates the triage process using Natural Language Processing (NLP) and Ensemble Machine Learning.
- Automated Categorization: Routes tickets into 11 departments (Billing, Tech Issue, Password Reset, etc.).
- Priority Prediction: Automatically flags High-Urgency tickets for immediate escalation.
- Smart SLAs: Recommends estimated response times and actionable next steps for human agents.
- Live Dashboard: Real-time analytics, pie charts, and prediction history.
- Dark Mode UI: Beautiful, premium glassmorphism interface built with Bootstrap 5.
- REST API: Includes a JSON endpoint (
/api/predict) for integration with mobile apps or other microservices.
- Data Engineering: Synthetic generation of realistic support tickets using
Faker. - Text Preprocessing: Tokenization, Stopword Removal, Regex cleaning, and Lemmatization via
NLTK. - Feature Extraction: Term Frequency-Inverse Document Frequency (TF-IDF).
- Model Selection: Automated benchmarking of Logistic Regression, SVM, Naive Bayes, Decision Trees, Random Forest, and Gradient Boosting.
- Deployment: Flask WSGI application serving a Jinja2 HTML frontend.
SupportTicketClassifier/
├── dataset/
│ ├── generate_dataset.py
│ └── support_tickets.csv
├── notebooks/
│ └── eda.py
├── models/
│ ├── best_category_model.joblib
│ └── tfidf_vectorizer.joblib
├── static/
│ ├── css/style.css
│ └── js/main.js
├── templates/
│ ├── base.html
│ ├── index.html
│ ├── result.html
│ └── dashboard.html
├── app.py
├── predict.py
├── preprocess.py
├── train.py
├── requirements.txt
└── README.md
-
Clone the repository:
git clone https://github.com/yourusername/SupportTicketClassifier.git cd SupportTicketClassifier -
Install dependencies:
pip install -r requirements.txt
-
Generate Data & Train Models:
python dataset/generate_dataset.py python preprocess.py python train.py
-
Run the Application:
python app.py
Navigate to
http://127.0.0.1:5000in your browser.
- Create a
Renderaccount and connect your GitHub. - Select New Web Service.
- Build Command:
pip install -r requirements.txt - Start Command:
gunicorn app:app - Click Deploy.
- Follow standard Python WSGI deployment steps using the provided
requirements.txtandgunicorn.
- Deep Learning: Upgrade TF-IDF to a transformer-based model like BERT or RoBERTa.
- Multilingual Support: Implement translation APIs to handle tickets in Spanish, French, etc.
- Database Integration: Migrate
prediction_history.jsonto PostgreSQL.
- Built by [Your Name]
This project is licensed under the MIT License.