How dineswarkumar/spam_message_detector works
Spam Shield is a prototype message-classification web app and API. A user submits a message through the served frontend; the FastAPI endpoint invokes the predictor, which returns a three-class verdict, confidence, and separately reported rule signals. The frontend also presents safety guidance and Indian fraud-reporting channels. The repository includes an offline corpus-assembly and model-training branch. The runtime calls are supported by excerpts; frontend guidance and reporting capabilities are documented in the README, while their implementation details were not sampled.
Main entry points: index.html Web app · predictor.py Inference predictor · main.py FastAPI endpoints · guards.py Context guards
Components 12
Web experience
- Web app
design/index.html - Safety guidance
design/index.html - Fraud reporting channels
design/index.html
Prediction service
- FastAPI endpoints
backend/main.py
Model and rules
- Inference predictor
backend/predictor.py - Trained classifier
backend/artifacts/model.joblib - Fraud rule signals
backend/predictor.py - Context guards
backend/guards.py - Model metadata
backend/artifacts/metadata.json
Corpus and training
- Corpus assembly
scripts/build_corpus.py - Model training
backend/train.py
Other components
- Message checker user
Connections 9
- Message checker user → Web app: submits message
README.md - Web app → FastAPI endpoints: requests prediction
backend/main.py - FastAPI endpoints → Inference predictor: invokes
backend/main.py - Inference predictor → Trained classifier: loads and predicts
backend/predictor.py - Inference predictor → Context guards: uses guards
backend/predictor.py - Inference predictor → Model metadata: loads metadata
- Web app → Safety guidance: presents
README.md - Web app → Fraud reporting channels: presents
README.md - Corpus assembly → Context guards: uses guards
backend/guards.py