This project implements an Email/SMS Spam Classification application using Streamlit and machine learning models trained with scikit-learn. The app can distinguish between spam and ham (legitimate) messages.
- Classify SMS messages as spam or ham
- Interactive web interface built with Streamlit
- Preprocessing with NLTK (stopwords, tokenization)
- Utilizes machine learning models like Random Forest and Naive Bayes
- Final model trained with Multinomial Naive Bayes for better accuracy
- Applied knowledge of Natural Language Processing (NLP) and deep learning
- Used
matplotlib.pyplot
andseaborn
for data visualization - Evaluated model performance with a confusion matrix to analyze accuracy and precision
- Pickle used for model serialization
- Clone the repository:
git clone https://github.com/AbhishekYadav915/Email-SMS_Spam_Classification.git
- Install the required dependencies:
pip install -r requirements.txt
- Download necessary NLTK resources:
import nltk
nltk.download('stopwords')
nltk.download('punkt')
streamlit run index.py
index.py
: Main application filerequirements.txt
: Dependencies for deployment
- Push the code to a GitHub repository.
- Go to Streamlit Community Cloud.
- Connect your repository and deploy the application.
For testing, you can use the following spam message:
Congratulations! 🎉 You’ve won a $1,000 gift card. Click here: http://fake-link.com to claim your prize now! 🚨
Access the live application here: SMS Spam Classifier
Access the code here: GitHub Repo
This project is licensed under the MIT License.