This project aims to classify emails and SMS messages as spam or not spam using machine learning and nlp techniques.
- Train a spam classifier using a labeled dataset.
- Evaluate the performance of the model.
- Deploy the model as a web application for real-time spam detection.
The app is deployed and can be accessed here.
app.py
: Streamlit application for running the classifier.requirements.txt
: Lists required Python packages.sms_spam_detection.ipynb
: Jupyter Notebook for training and evaluating the model and for data understanding using Exploratory Data Analysis.spam.csv
: Dataset containing labeled messages.model_files/
: Directory containing vectorizer and trained model files.
- Clone the repository:
git clone https://github.com/Phani943/Email_Sms_Spam_Classifier.git
- Navigate to the project directory:
cd Email_Sms_Spam_Classifier
- Install the required packages:
pip install -r requirements.txt
-
Training the Model:
- Open and run the
sms_spam_detection.ipynb
notebook to train and evaluate the spam classifier.
- Open and run the
-
Running the Web Application:
- Start the Streamlit app:
streamlit run app.py
- Open your web browser and go to url provided there, to use the spam classifier.
- Start the Streamlit app:
The spam.csv
file contains the labeled messages used for training. Each message is labeled as either "spam" or "ham" (not spam).
- The dataset used in this project is sourced from the Kaggle/UCI Machine Learning.