How shivamtiwari01016/nlp works
Support Ticket Triage is a browser-based console backed by a FastAPI service. Operators submit ticket text; the API classifies its category, independently scores sentiment-based urgency, maps the category to a team, and persists the ticket with its prediction before returning a result. The console also presents ticket history, database statistics, model metrics, and an explainer for the NLP pipeline. Training uses the Kaggle-derived data and produces the classifier and evaluation metrics. The workflow follows the README and sampled service/client code; detailed route wiring and model internals were not sampled.
Main entry points: api.js HTTP client · api.py FastAPI routes · prediction_service.py Prediction workflow · train.py Training workflow
Components 20
Triage console
- Web application
frontend/src/App.jsx - Ticket analyzer
frontend/src/pages/TicketAnalyzer.jsx - Dashboard
frontend/src/pages/Dashboard.jsx - Model information
frontend/src/pages/ModelInfo.jsx - Pipeline explainer
frontend/src/pages/Pipeline.jsx - HTTP client
frontend/src/services/api.js
API workflows
- FastAPI routes
src/ticket_triage/api.py - Prediction workflow
src/ticket_triage/services/prediction_service.py - Ticket read workflows
src/ticket_triage/services/ticket_service.py
Inference and routing
- Category classifier
src/ticket_triage/model.py - Text preprocessing
src/ticket_triage/preprocessing.py - Urgency scoring
src/ticket_triage/urgency.py - Team assignment
src/ticket_triage/services/routing_service.py
Ticket persistence
- Ticket repository
src/ticket_triage/repositories/ticket_repository.py - MySQL database
src/ticket_triage/models.py
Model training
- Training workflow
src/ticket_triage/train.py - Label preparation
src/ticket_triage/data.py - Evaluation metrics
src/ticket_triage/api.py
Other components
- Support operator
- spaCy and VADER
Connections 22
- Support operator → Ticket analyzer: enters ticket
- Web application → HTTP client: loads history and health
- Ticket analyzer → HTTP client: submits ticket
- Dashboard → HTTP client: requests dashboard data
- Model information → HTTP client: requests metrics
- HTTP client → FastAPI routes: sends HTTP requests
- FastAPI routes → Prediction workflow: dispatches inference
- FastAPI routes → Ticket read workflows: dispatches reads
- Prediction workflow → Category classifier: predicts category
- Category classifier → Text preprocessing: transforms text
- Prediction workflow → Urgency scoring: scores sentiment
- Urgency scoring → spaCy and VADER: uses VADER
- Prediction workflow → Team assignment: assigns team
- Prediction workflow → Ticket repository: saves prediction
- Ticket read workflows → Ticket repository: queries tickets
- Ticket repository → MySQL database: reads and writes
- Training workflow → Label preparation: prepares labels
- Training workflow → Text preprocessing: builds text features
- Training workflow → Category classifier: trains classifier
- Training workflow → spaCy and VADER: uses spaCy
- FastAPI routes → Evaluation metrics: serves evaluation
- FastAPI routes → HTTP client: returns API data