This project is a comprehensive SMS/Email Spam Classifier built using Python, Streamlit, Scilit-learn and NLTK.
The classifier uses a trained model to predict whether a given message is spam or not. The model is based on the Naive Bayes algorithm and uses TF-IDF for vectorization.
- Clone the repository:
git clone https://github.com/princ0301/Spam-Classifier.git cd spam-Classifier - Install the required packages:
pip install -r requirements.txt
- Download NLTK stopwords:
python -c "import nltk; nltk.download('stopwords')"
- Open the Streamlt app in your web browser.
streamlit run app.py- Enter or copy the text message that you want to classify in the provided text area.
- Click the "Predict" button.
- The app will display whether the input message is classified as "Spam" or "Not Spam" based on the trained Multinomial Naive Bayes(MNB) model's prediction.
- app.py: The main Streamlit application file that allows users to input text messages and get predictions.
- model.pkl: A pickled file containing the trained Multinomial Naive Bayes (MNB) machine learning model for spam classification.
- vectorizer.pkl: A pickled file containing the TF-IDF vectorizer used for text feature extraction.
- README.md: This comprehensive documentation file that covers the Streamlit app.