How priyankshu-07/vox works
VOX is an offline Hinglish delivery-command NLU product. Its primary workflow is partner text input in the frontend, local HTTP prediction through FastAPI, intent classification plus deterministic slot extraction, and a contextual response displayed with confidence and slots. The repository also contains a training/evaluation pipeline for the Bi-GRU model and its tokenizer. README documents a benchmark endpoint and voice-oriented use; the sampled UI only simulates voice input, and route details beyond the sampled endpoints are not verified.
Main entry points: inference_service.py Inference engine · routes.py Prediction API · dataset.py Intent dataset · train.py Model training
Components 19
Partner interface
- Command dashboard
frontend/src/App.tsx
Inference API
- Prediction API
backend/api/routes.py - Prediction schema
backend/schemas/predict.py - Inference engine
backend/services/inference_service.py - Slot extraction
backend/services/slot_extractor.py - Response generation
backend/services/response_generator.py - FastAPI app
backend/main.py
Model pipeline
- Synthetic data
ml_pipeline/data_generator.py - Intent dataset
ml_pipeline/dataset.py - Word tokenizer
ml_pipeline/tokenizer.py - Bi-GRU classifier
ml_pipeline/model.py - Model training
ml_pipeline/train.py - Model evaluation
ml_pipeline/evaluate.py - Pipeline inference
ml_pipeline/inference.py - Model artifacts
model
API support
- Exception handlers
backend/core/exceptions.py - Structured logging
backend/core/logger.py
Other components
- Delivery partner
- Backend service
Connections 26
- Delivery partner → Command dashboard: enters command
README.md - Command dashboard → Prediction API: posts text
frontend/src/App.tsx - Prediction API → Prediction schema: validates and shapes
backend/api/routes.py - Prediction API → Inference engine: invokes prediction
backend/api/routes.py - Inference engine → Slot extraction: extracts slots
backend/services/inference_service.py - Inference engine → Response generation: generates response
backend/services/inference_service.py - FastAPI app → Prediction API: mounts routes
backend/main.py - FastAPI app → Exception handlers: registers handlers
backend/main.py - FastAPI app → Structured logging: logs requests
backend/main.py - Inference engine → Structured logging: logs inference
backend/services/inference_service.py - Inference engine → Exception handlers: raises failures
backend/services/inference_service.py - Inference engine → Model artifacts: loads ONNX and vocabulary
backend/services/inference_service.py - Prediction API → Command dashboard: returns prediction
README.md - Synthetic data → Intent dataset: supplies training corpus
- Intent dataset → Word tokenizer: encodes examples
ml_pipeline/dataset.py - Model training → Intent dataset: uses training data
ml_pipeline/train.py - Model training → Word tokenizer: uses vocabulary
ml_pipeline/train.py - Model training → Bi-GRU classifier: trains classifier
ml_pipeline/train.py - Model evaluation → Intent dataset: loads examples
ml_pipeline/evaluate.py - Model evaluation → Word tokenizer: uses vocabulary
ml_pipeline/evaluate.py - Model evaluation → Bi-GRU classifier: evaluates classifier
ml_pipeline/evaluate.py - Pipeline inference → Word tokenizer: encodes input
ml_pipeline/inference.py - Pipeline inference → Bi-GRU classifier: runs inference
ml_pipeline/inference.py - Pipeline inference → Intent dataset: uses intent map
ml_pipeline/inference.py - Model training → Model artifacts: exports model artifacts
- Backend service → Prediction API: sends local HTTP requests