How akj492003-design/spam-classifier works
This is a Flask web app for classifying submitted messages as spam or not spam. A user opens the form, submits a message, and the prediction route preprocesses it, transforms it with the saved TF-IDF vectorizer, and passes it to the saved classifier before rendering the result. Text normalization and prediction are both implemented in app.py. The graph reflects the sampled app source; template details and any model-training workflow were not inspected.
Main entry points: app.py Flask routes · index.html Message form · vectorizer.pkl TF-IDF vectorizer · model.pkl Spam classifier
Components 6
Web interface
- Message form
templates/index.html
Classification runtime
- Flask routes
app.py - Text preprocessing
app.py
Saved models
- TF-IDF vectorizer
vectorizer.pkl - Spam classifier
model.pkl
Other components
- User
Connections 7
- User → Message form: opens
- Message form → Flask routes: submits message
- Flask routes → Message form: renders page
app.py - Flask routes → Text preprocessing: preprocesses
app.py - Flask routes → TF-IDF vectorizer: transforms text
app.py - Flask routes → Spam classifier: predicts class
app.py - Flask routes → Message form: renders prediction
app.py