This project is a machine learning-based email classifier that predicts whether an email is spam or not. It uses natural language processing (NLP) techniques and machine learning algorithms to classify emails.
In this project, we developed an email classification model that predicts whether an email is spam or not spam. The model is deployed using Flask, making it easy to interact with via a web interface.
Below is a screenshot of the web application in use:
Above is a spam email❌
Above is a ham/not spam email✅
- Web Interface: A user-friendly interface built using Flask where users can input email text, and the model will predict whether the email is spam or not.
- Machine Learning Model: The classifier is built using a supervised learning model trained on labeled email data.
- TF-IDF Vectorization: The text data is preprocessed and vectorized using the TF-IDF technique to capture the importance of words in the emails.
- Spam Detection: The model uses advanced techniques to accurately classify emails as spam (❌) or not spam (✅).
- Flask 🧰: Web framework used to build the web app.
- Python 🐍: The primary programming language used for the project.
- scikit-learn ⚙️: Machine learning library used for building and training the classification model.
- TfidfVectorizer 🔥: Tool used for converting the email content into a numerical format for machine learning models.
- HTML/CSS 💻: Front-end technologies used for designing the user interface.
To set up the project locally, follow these steps:
-
Clone the repository:
git clone https://github.com/Osisehh/Email-Classifier cd Email-Classifier -
Create a virtual environment (optional but recommended):
python -m venv venv
-
Activate the virtual environment:
- On Windows:
venv\Scripts\activate
- On macOS/Linux:
source venv/bin/activate
- nstall the required dependencies:
pip install -r requirements.txt
- Run the Flask app:
python app.py
- Open your browser and go to http://127.0.0.1:5000/. You’ll see the email classification form.
- Paste an email message into the form and click the "Classify" button to see if the email is spam or not.
This project is licensed under the MIT License - see the LICENSE file for details.
For any inquiries, feel free to reach out to me:
- Email: [osisehirudunoghena@gmail.com]
- LinkedIn: [www.linkedin.com/in/osiseh-irudunoghena]
- Github: [https://github.com/Osisehh]
- Thanks to the open-source community for providing valuable resources and tools like Flask, scikit-learn, and TfidfVectorizer.
- A special shout-out to Kaggle for their machine learning datasets, which were used to train the model.

