https://github.com/coding-for-it/spam-mail-prediction
Detects whether the content of the mail is spam or not
https://github.com/coding-for-it/spam-mail-prediction
jupyter-notebook python streamlit
Last synced: 9 months ago
JSON representation
Detects whether the content of the mail is spam or not
- Host: GitHub
- URL: https://github.com/coding-for-it/spam-mail-prediction
- Owner: coding-for-it
- License: mit
- Created: 2025-06-30T11:42:49.000Z (9 months ago)
- Default Branch: main
- Last Pushed: 2025-06-30T11:49:44.000Z (9 months ago)
- Last Synced: 2025-06-30T12:42:33.310Z (9 months ago)
- Topics: jupyter-notebook, python, streamlit
- Language: Jupyter Notebook
- Homepage:
- Size: 0 Bytes
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# **Spam Mail Prediction**
This project is a machine learning-based system that predicts whether an email is spam or not. It features a **Streamlit-based frontend** for user interaction and uses **pre-trained ML models** on **TF-IDF-transformed** text for prediction.
---
## **Project Structure**
- **`app.py`**: Streamlit application code for real-time spam email classification.
- **`spam_mail_prediction.ipynb`**: Jupyter notebook for data preprocessing, model training, and evaluation.
- **`models/`**: Stores trained models (`.pkl` files) for Logistic Regression, Naive Bayes, and Random Forest.
- **`data/`**: Contains the dataset `mail_data.csv`.
- **`output/`**: Contains visual outputs like `spam.png` and `not spam.png`.
- **`requirements.txt`**: Lists required Python packages.
- **`README.md`**: Overview and setup instructions for the project.
---
## **Setup Instructions**
1. **Clone the repository**:
```bash
git clone https://github.com/coding-for-it/spam-mail-prediction.git
cd spam-mail-prediction
2. **Install dependencies**:
```bash
pip install -r requirements.txt
3. **Run the Streamlit app**:
```bash
streamlit run app.py