Skip to content

shruti-2412/SMS-Spam-Classifier

Repository files navigation

SMS Spam Classifier

This is a repository containing code for an SMS spam classifier built using the Multinomial Naive Bayes algorithm and NLTK (Natural Language Processing Toolkit). The classifier is implemented using supervised learning techniques and can effectively classify SMS messages as either spam or non-spam.

Deployment link: https://shruti-2412-sms-spam-classifier-app-191152.streamlit.app/

Requirements

  • Python 3.6 or higher
  • NLTK
  • Scikit-learn
  • Streamlit

Installation

Clone the repository:

git clone https://github.com/username/SMS-Spam-Classifier.git

Install the required dependencies:

pip install -r requirements.txt

Usage

Make sure you have the NLTK stopwords corpus downloaded. If not, open a Python shell and run the following commands:

import nltk
nltk.download('stopwords')

To start the Streamlit app:

streamlit run app.py

Screenshot

sms