| π Overview | β¨ Features | π οΈ Tech Stack | βοΈ How It Works |
|---|---|---|---|
| π Structure | π Performance | π¨ UI Preview | |
| πΊοΈ Roadmap | π€ Contributing | π€ Author | π License |
SpamSentry analyzes the text of an email or SMS message and classifies it as π« Spam or β Ham (Not Spam) using a trained Multinomial Naive Bayes model.
It combines classic NLP preprocessing with TF-IDF vectorization to extract meaningful features from raw text β then feeds them into a lightweight, blazing-fast classifier that returns a verdict and a confidence score in milliseconds.
π‘ Built for speed, transparency, and simplicity β no black-box deep learning, just clean, explainable classical ML that performs exceptionally well on short-text spam detection.
|
|
|
|
flowchart LR
A[π© Raw Message Input] --> B[π§Ή Preprocessing]
B --> C[π Tokenization & Stopword Removal]
C --> D[π± Stemming]
D --> E[π TF-IDF Vectorization]
E --> F[π€ Naive Bayes Model]
F --> G{Prediction}
G -->|Spam| H[π« Spam + Confidence %]
G -->|Ham| I[β
Ham + Confidence %]
style A fill:#00F5D4,stroke:#000,color:#000
style F fill:#FF4B4B,stroke:#000,color:#fff
style H fill:#FF6B6B,stroke:#000,color:#fff
style I fill:#51CF66,stroke:#000,color:#000
| Step | Description |
|---|---|
| 1οΈβ£ Preprocessing | The input message is cleaned, tokenized, and normalized (lowercasing, stopword removal, stemming). |
| 2οΈβ£ Vectorization | Cleaned text is converted into numerical features using TF-IDF. |
| 3οΈβ£ Classification | A trained Multinomial Naive Bayes model predicts Spam / Ham with a confidence score. |
| Metric | Score |
|---|---|
| β Accuracy | 97.4% |
| π― Precision | 96.8% |
| π Recall | 95.9% |
| βοΈ F1-Score | 96.3% |
| π¦ Training Samples | 5,500+ |
π Metrics are illustrative β update with your actual
classification_report()output for full transparency.
(Replace this GIF with a real screen-recording of SpamSentry in action β e.g. via ScreenToGif or LICEcap)
# 1οΈβ£ Clone the repository
git clone https://github.com/ayeshajavid91-star/SpamSentry.git
# 2οΈβ£ Move into the project folder
cd SpamSentry
# 3οΈβ£ Install dependencies
pip install -r requirements.txt
# 4οΈβ£ Launch the app
streamlit run app.pySpamSentry/
βββ π app.py # Streamlit application (UI + inference)
βββ π§ spam_classifier.py # Model training / classification logic
βββ πΎ spam_model.pkl # Trained Naive Bayes model
βββ π’ tfidf_vectorizer.pkl # Fitted TF-IDF vectorizer
βββ π data/ # Training dataset
βββ π requirements.txt # Python dependencies
βββ π README.md # You are here
- Core Naive Bayes spam classifier
- TF-IDF feature pipeline
- Streamlit deployment
- Add Deep Learning (LSTM/BERT) comparison mode
- Multi-language spam detection
- REST API endpoint via FastAPI
- Browser extension for Gmail integration
Contributions, issues, and feature requests are welcome for discussion β please reach out to the author first, as this repository is All Rights Reserved (see License).
python β’ machine-learning β’ spam-classifier β’ naive-bayes β’ nlp β’ streamlit β’ tfidf β’ text-classification
All Rights Reserved.
This project and its source code are the intellectual property of the author. No part of this repository β including the code, design, or documentation β may be copied, modified, distributed, used, or reproduced in any form without the explicit written permission of the author.
Β© 2026 Ayesha Javid. Unauthorized use is strictly prohibited.
π§ For permissions or licensing inquiries, contact: ayeshajavid91@gmail.com
