How sithilsemitha/deathbed-ai works
DeathBed is a text-classification API for life decisions. The main workflow accepts a query, validates and cleans it, predicts a category, derives a subcategory and confidence-based override flag, then returns a summary. A separate training workflow builds a TF-IDF classifier from labeled data. The source scripts expect data/raw and models paths, but the tree places those resources under ml_service; those links are therefore unverified. The README describes Naive Bayes, while the server health response names logistic regression.
Main entry points: inference_server.py HTTP server · train_from_csv.py Training pipeline · decision_classifier.pkl Classifier artifact · labels.pkl Category labels
Components 12
Classification API
- HTTP server
inference_server.py - Input validation
inference_server.py - Text cleaning
inference_server.py - Category prediction
inference_server.py - Subcategory mapping
inference_server.py - Response assembly
inference_server.py - Health endpoint
inference_server.py
Model training
- Training pipeline
train_from_csv.py
Data and artifacts
- Decision dataset
ml_service/data/raw/life_decisions_dataset.csv - Classifier artifact
ml_service/models/decision_classifier.pkl - Category labels
ml_service/models/labels.pkl
Other components
- API caller
Connections 14
- API caller → HTTP server: sends request
README.md - HTTP server → Input validation: routes classify
inference_server.py - Input validation → Text cleaning: cleans input
inference_server.py - Text cleaning → Category prediction: predicts category
inference_server.py - Input validation → Subcategory mapping: maps category
inference_server.py - Category prediction → Response assembly: provides score
inference_server.py - Subcategory mapping → Response assembly: provides label
inference_server.py - HTTP server → Health endpoint: routes health
inference_server.py - API caller → Health endpoint: checks status
README.md - Training pipeline → Decision dataset: reads data
- Training pipeline → Classifier artifact: writes model
- Training pipeline → Category labels: writes labels
- HTTP server → Classifier artifact: loads model
- HTTP server → Category labels: loads labels