How mudassira10/spam-sms-detector works
SpamGuard AI is a Streamlit SMS spam detector. A user submits a message, which is vectorized for Linear SVM classification and independently checked for suspicious patterns; the prediction and warnings inform a risk score and displayed result. The implementation is concentrated in app.py, with the trained model and TF-IDF vectorizer stored as pickle artifacts. The README documents the overall workflow; the excerpts show the safety checks, scoring, model loading, and result rendering, but omit some intervening code.
Main entry points: app.py Message Input · tfidf.pkl TF-IDF Vectorizer · spam_model.pkl Spam Classifier
Components 7
Message Interface
- Message Input
app.py
Detection
- TF-IDF Vectorizer
tfidf.pkl - Spam Classifier
spam_model.pkl - Safety Checks
app.py
Risk Results
- Risk Assessment
app.py - Detection Results
app.py
Other components
- SMS User
Connections 8
- SMS User → Message Input: submits message
README.md - Message Input → TF-IDF Vectorizer: vectorizes text
README.md - TF-IDF Vectorizer → Spam Classifier: provides features
README.md - Message Input → Safety Checks: checks message
app.py - Spam Classifier → Risk Assessment: provides prediction
app.py - Safety Checks → Risk Assessment: provides warnings
app.py - Risk Assessment → Detection Results: renders assessment
app.py - Detection Results → SMS User: shows result
README.md