The Spam Classifier is a machine learning model designed to classify emails as spam or non-spam. This system utilizes the TREC06P dataset and employs Naive Bayes and LSTM models to perform classification tasks.
Follow these instructions to set up the project on your local machine for development and testing purposes.
To install the software, you will need the following:
- Python 3.9
- Pip
- Git
- Conda (Anaconda or Miniconda)
- Additional packages can be found in the
requirements.txt
file, and anenvironment.yml
file is provided for convenience.
-
Clone or download the repository to your local computer:
git clone https://github.com/DGitHub-Creator/PythonSpamClassifier.git
-
Change to the project directory:
cd PythonSpamClassifier
-
(Optional) Create a virtual environment using Conda:
You can directly create a conda environment using the following command:
conda env create -f environment.yml
Alternatively, create a conda environment using these commands:
a. Create a Conda virtual environment called "tensorflow_env" with Python version 3.9:
conda create --name tensorflow_env python=3.9
b. Activate the virtual environment:
conda activate tensorflow_env
c. Install the required packages:
pip install -r requirements.txt
After setting up the environment and installing the required packages, activate the environment, go to the project directory and use the spam filter as follows:
python GUI.py
The graphical user interface (GUI) will appear, prompting you to enter your email. The emails will be classified as spam or non-spam based on the selected model, with results displayed in the GUI.
- Scikit-learn - A machine learning library for Python
- Numpy - A library for working with arrays
- Pandas - A library for working with dataframes
- Tensorflow - An open-source software library for dataflow and differentiable programming
- Keras - An open-source software library for deep learning
- PyQt5 - A set of Python bindings for the Qt libraries for GUI development
If you would like to contribute to the project, please fork the repository and submit a pull request.
This project is licensed under the MIT License - see the LICENSE.md file for details.