A Machine Learning powered web application that classifies SMS messages as Spam or Not Spam. The project is built using Python, Flask, Scikit-learn, NLTK, and a Voting Classifier for robust spam detection.
Deployment Link: --- https://filter-fox-sms-spam-detector.vercel.app
- Detects whether an SMS message is Spam or Not Spam.
- Complete text preprocessing pipeline.
- TF-IDF Vectorization.
- Ensemble Voting Classifier.
- Flask backend with HTML & CSS frontend.
- Fast real-time prediction.
- Python
- Scikit-learn
- NLTK
- TF-IDF Vectorizer
- Voting Classifier
- Flask
- HTML5
- CSS3
- JavaScript
- Data Cleaning
- Exploratory Data Analysis (EDA)
- Text Preprocessing
- Lowercasing
- Tokenization
- Removing Special Characters
- Stopword Removal
- Stemming
- TF-IDF Vectorization
- Model Training
- Hyperparameter Tuning
- Model Evaluation
- Voting Ensemble
- Deployment
- Multinomial Naive Bayes
- Logistic Regression
- Support Vector Machine (SVM)
- K-Nearest Neighbors (KNN)
- Decision Tree
- Extra Trees Classifier
- XGBoost
- Voting Classifier
The final deployed model is a Voting Classifier consisting of:
- Multinomial Naive Bayes
- Extra Trees Classifier
This combination achieved the best balance between precision and recall while maintaining zero false positives on the test set.
The project was evaluated using:
- Accuracy
- Precision
- Recall
- F1 Score
- Cross Validation
- Confusion Matrix
Since the business objective was to never classify a legitimate (ham) message as spam, Precision was treated as the primary evaluation metric.
FILTERFOX-SMS-Spam-Detector/
│
├── api/
├── data/
├── model/
├── notebooks/
├── static/
├── templates/
├── README.md
├── requirements.txt
├── .gitignore
└── README.md
Clone the repository
git clone https://github.com/ak-junior3339/FilterFox-SMS-Spam-Detector.gitNavigate to the project
cd FilterFox-SMS-Spam-DetectorCreate a virtual environment
python -m venv venvActivate the virtual environment
source venv/bin/activatevenv\Scripts\activateInstall dependencies
pip install -r requirements.txtRun the Flask application
python api/index.pyInput
Congratulations! You have won a FREE iPhone. Click the link below to claim your prize
Prediction
Spam
- End-to-end Machine Learning workflow
- NLP text preprocessing
- TF-IDF Vectorization
- Model evaluation and comparison
- Hyperparameter tuning
- Ensemble Learning
- Flask backend development
- Frontend integration using HTML, CSS, and JavaScript
- Model deployment
This project is licensed under the MIT License.
Aishwarya Kumar Singh
If you found this project helpful, consider giving it a ⭐ on GitHub!