In today's digital world, spam emails are everywhere โ from fake offers to phishing attempts.
This project builds a Spam Email Detection System using TensorFlow and Python to automatically classify emails as:
- ๐ฉ Ham (Not Spam)
- ๐ซ Spam
The model learns patterns from email text data and predicts whether a message is spam with high efficiency.
- โจ Intelligent classification of emails
- ๐งน Text preprocessing & cleaning pipeline
- ๐ง Deep learning model powered by TensorFlow
- โก Fast and efficient predictions
- ๐ Easy-to-understand workflow
- ๐ Clean and modular code structure
- ๐ Python
- ๐ถ TensorFlow
- ๐ข NumPy
- ๐ Pandas
- ๐ค Scikit-learn
- ๐งพ Natural Language Processing (NLP)
-
Data Collection
- Email dataset containing spam and ham messages
-
Text Preprocessing
- Lowercasing
- Removing punctuation & stopwords
- Tokenization
-
Feature Extraction
- Converting text into numerical format (e.g., TF-IDF / Tokenizer)
-
Model Building
- Neural Network using TensorFlow
-
Training
- Model learns patterns in spam vs ham emails
-
Prediction
- Classifies new emails as Spam or Ham
Spam-Email-Detection/
โ
โโโ data/
โ โโโ spam.csv # Dataset
โ
โโโ notebooks/
โ โโโ EDA.ipynb # Data analysis & visualization
โ
โโโ src/
โ โโโ preprocessing.py # Text cleaning functions
โ โโโ model.py # TensorFlow model
โ โโโ train.py # Training script
โ โโโ predict.py # Prediction script
โ
โโโ saved_model/
โ โโโ model.h5 # Trained model
โ
โโโ requirements.txt # Dependencies
โโโ README.md # Project documentation
โโโ main.py # Entry point