This project is a machine learning–powered web application that classifies SMS or email messages as Spam or Not Spam. It uses natural language processing (NLP) techniques with TF-IDF vectorization and classical machine-learning models, deployed as an interactive web app using Streamlit.
👉[] https://sms-spam-detection-by-shraddha.streamlit.app/
👉 https://www.kaggle.com/datasets/uciml/sms-spam-collection-dataset
- Text preprocessing with NLTK
- TF-IDF vectorization
- Multiple models evaluated (Naive Bayes, SVM, ensembles, etc.)
- Final trained model used is naive bayes
- Interactive Streamlit interface
- Cloud-deployable via GitHub
- Text cleaning & normalization
- Tokenization and stopword removal
- TF-IDF feature extraction
- Model training & evaluation
- Model serialization using Pickle
- Deployment using Streamlit
sms-spam-detection/
│
├── app.py # Streamlit app
├── model.pkl # Trained ML pipeline
├── vectorizer.pkl
├── requirements.txt # Dependencies
├── Sms_Spam_classifier.ipynb # Notebook
├── README.md # Project documentation
├── .gitignore
├── screenshots/ # App screenshots for READMEThe app automatically downloads required NLTK resources (punkt, punkt_tab, and stopwords) at runtime so that tokenization works correctly in cloud deployments.
Several models were trained and compared:
-
Multinomial Naive Bayes
-
Support Vector Machine
-
Logistic Regression
-
Random Forest
-
Gradient Boosting
-
Voting & Stacking Ensembles
The best-performing model was selected and deployed.
git clone https://github.com/smshelar/sms-spam-detection.git
cd sms-spam-detectionSpam
Congratulations! You have won a free voucher. Click now!Not Spam
Hi, are we still meeting tomorrow afternoon?-
Deep-learning–based text models
-
Language detection
-
Probability score display
-
Model explainability (SHAP / feature importance)
-
Dataset expansion