π§ 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