Welcome to the Email Spam Detector project repository! This project focuses on building a spam detection system using natural language processing techniques. The detector analyzes text data to classify emails as either spam or legitimate (ham).
- data: Contains the dataset used for training and testing (
spam.csv
). - email-spam-detector.ipynb: Jupyter Notebook containing the main code and documentation.
- main.py: Python script for running the spam detection model.
- models: Directory to store trained model files (
model.pkl
andvectorizer.pkl
). - README.md: You are here! Provides an overview of the project.
- requirements.txt: Lists project dependencies for easy environment setup.
- screenshots: Contains screenshots for illustration (
ham.png
andspam.png
). - static: Static files for the web application.
- img: Images used in the web application (
logo-64x64.png
).
- img: Images used in the web application (
- templates: HTML templates for the web application.
- index.html: Main page template.
-
Clone the repository:
git clone https://github.com/MrMDrX/Email-Spam-Detector.git
-
Navigate to the Project Directory:
cd Email-Spam-Detector
-
Create and Activate a Virtual Environment (Optional but recommended):
python -m venv venv source venv/bin/activate # On Windows, use 'venv\Scripts\activate'
-
Install dependencies:
pip install -r requirements.txt
-
Run the spam detector:
python main.py
The project includes a simple web application for testing the spam detector. The web application is built using Flask and integrates HTMX for dynamic content updates. Access the application by running main.py
and visiting http://localhost:5000 in your web browser.
- The model and vectorizer files (
model.pkl
andvectorizer.pkl
) in themodels
directory are essential for the spam detection functionality.
If you'd like to contribute to this project, feel free to fork the repository and submit a pull request. You can also open issues for bug reports or feature requests.
This project is licensed under the MIT License - see the LICENSE file for details.
Happy coding!