Spamly is a machine learning-based SMS spam classifier built using Python, Scikit-learn, and Streamlit. It uses Natural Language Processing (NLP) techniques such as TF-IDF vectorization and Multinomial Naive Bayes to classify incoming messages as either spam or ham (not spam). The project offers an interactive web interface that allows users to test messages in real-time.
- Predicts whether an SMS message is spam or ham
- Trained on a real-world dataset of spam and ham messages
- Uses TF-IDF for text vectorization
- Deployed as a web app using Streamlit
- Simple UI for live input and prediction
- Python
- Scikit-learn
- Pandas
- NumPy
- Streamlit
- Pickle (for saving model and vectorizer)
├── spam.csv # Dataset
├── sms_model.py # Model Script
├── spam_classifier_model.pkl # Trained spam classifier model
├── tfidf_vectorizer.pkl # TF-IDF vectorizer
├── app.py # Streamlit web application
├── requirements.txt # List of dependencies
└── README.md # This file
-
Clone the repository bash git clone https://github.com/yourusername/spamly.git cd spamly
-
Install dependencies pip install -r requirements.txt
-
Run the Streamlit app streamlit run app.py
-
Visit the app in your browser Default: http://localhost:8501
📊 Sample Output You enter: "Congratulations! You've won a free iPhone. Click here to claim."
Spamly predicts: Prediction: SPAM
📈 Future Enhancements Add support for multiple languages
Track message history in session
Deploy online using platforms like Render or Hugging Face Spaces
Bipin Yadav
📧 bipinyadav919@gmail.com
🔗 LinkedIn
🔗 GitHub
🔗 Live project Link