📧 Spam Mail Detector — Machine Learning Project
A lightweight Machine Learning application that classifies messages as Spam or Ham (Not Spam) in real-time using Natural Language Processing and Logistic Regression. The project also includes a simple GUI interface for easy interaction.
🚀 Features
Real-time spam detection
Clean Tkinter GUI
Fast and lightweight model
NLP based text preprocessing
TF-IDF vectorization
Modular training & prediction pipeline
🧠 How It Works
Load dataset (mail_data.csv)
Preprocess text (cleaning & tokenization)
Convert text → numerical vectors using TF-IDF
Train Logistic Regression model
Predict message as:
HAM (Not Spam)
SPAM
🛠 Tech Stack
Language
Python
Libraries
scikit-learn
pandas
numpy
tkinter
Concepts Used
Machine Learning Classification
Natural Language Processing (NLP)
TF-IDF Vectorization
Logistic Regression
📧 Spam Mail Detector — Machine Learning Project
A lightweight Machine Learning application that classifies messages as Spam or Ham (Not Spam) in real-time using Natural Language Processing and Logistic Regression. The project also includes a simple GUI interface for easy interaction.
🚀 Features
Real-time spam detection
Clean Tkinter GUI
Fast and lightweight model
NLP based text preprocessing
TF-IDF vectorization
Modular training & prediction pipeline
🧠 How It Works
Load dataset (mail_data.csv)
Preprocess text (cleaning & tokenization)
Convert text → numerical vectors using TF-IDF
Train Logistic Regression model
Predict message as:
HAM (Not Spam)
SPAM
🛠 Tech Stack
Language
Python
Libraries
scikit-learn
pandas
numpy
tkinter
Concepts Used
Machine Learning Classification
Natural Language Processing (NLP)
TF-IDF Vectorization
Logistic Regression spam-mail-detector/ │── main.py │── mail_data.csv │── README.md
⚙️ Installation & Run 1️⃣ Clone Repository git clone https://github.com/mohityadav8/spam-mail-detector-.git cd spam-mail-detector-
2️⃣ Create Virtual Environment
Windows
python -m venv venv venv\Scripts\activate
Linux/Mac
python3 -m venv venv source venv/bin/activate
3️⃣ Install Dependencies pip install pandas numpy scikit-learn
4️⃣ Run Application python main.py
🎯 Output
The GUI will open and allow you to enter any message. The model will instantly classify it as Spam or Ham.
📌 Future Improvements
Convert to Web App (Flask/Django)
Add Deep Learning model (LSTM/BERT)
Deploy online
Improve dataset accuracy
👨💻 Author
Mohit Yadav