In real-world companies, support teams receive hundreds or thousands of tickets daily. Manually sorting tickets wastes time and delays urgent issues.
This project builds an end-to-end NLP system that:
- Classifies support tickets into categories (Billing, Technical Issue, Account, etc.)
- Assigns priority levels (High, Medium, Low)
- Provides an interactive web app demo for real-time predictions
This system mimics real operational ML used by SaaS companies and IT support teams.
- Text preprocessing with NLTK: lowercasing, punctuation removal, stopword filtering
- Feature extraction with TF-IDF
- Classification using Logistic Regression
- Rule-based priority boost for urgent tickets
- Interactive Streamlit web app for predictions
- Well-documented and modular Python code
- Python
- Jupyter Notebook (for experimentation)
- Scikit-learn (ML models)
- NLTK / spaCy (NLP preprocessing)
- Streamlit (web interface)
FUTURE_ML_02/ ├─ app/ │ └─ app.py # Streamlit web app ├─ data/ │ └─ tickets.csv # Dataset (support tickets) ├─ src/ │ ├─ preprocessing.py # Text cleaning functions │ ├─ train.py # Model training pipeline │ └─ predict.py # Prediction pipeline ├─ model_category.pkl # Saved category model ├─ model_priority.pkl # Saved priority model ├─ vectorizer.pkl # TF-IDF vectorizer ├─ label_category.pkl # Category label encoder ├─ label_priority.pkl # Priority label encoder ├─ requirements.txt └─ README.md
The project includes an interactive web app built with Streamlit.
- Enter support ticket text
- Predict ticket category (Billing, Technical, Account, etc.)
- Predict priority (High, Medium, Low)
- Rule-based boost for urgent tickets
- Real-time interactive results
# Install dependencies
pip install -r requirements.txt
# Run Streamlit app
streamlit run app/app.py
📊 Model Evaluation
Example performance on the dataset:
Model
Accuracy
Precision
Recall
F1-score
Category
92%
0.91
0.92
0.91
Priority
89%
0.88
0.89
0.88
Metrics are examples – update with your actual evaluation results.
💡 Business Impact
Reduces manual sorting of tickets by 70%
Speeds up response to urgent issues
Improves customer satisfaction
Can be deployed for real-world SaaS or IT support systems
🔗 Demo / Share
Streamlit Web App (local demo)
Future feature: Deploy on Streamlit Cloud or Heroku for public demo
📌 Commit & Development History
feat: implement robust text preprocessing with regex cleaning and stopword removal
feat: build reproducible ML training pipeline with TF-IDF and logistic regression models
feat: add prediction module with priority boosting and structured output
feat: build Streamlit web app for support ticket classification demo
docs: add polished README with project overview, demo, and evaluation
📝 Author
Lamla Mhlana – aspiring ML Engineer / Data Scientist
GitHub: https://github.com/Lami14�