This is a basic web application that uses a Naive Bayes Classifier to detect spam messages. It uses a pre-existing dataset of labeled messages, trains a model, and uses it to predict whether a given message is spam or not.
- Flask (web framework)
- Scikit-Learn (machine learning library)
- Pandas (data manipulation library)
- NumPy (numerical computing library)
- Jinja2 (template engine)
- Clone the repository
- Set up a virtual environment by running
python -m venv env
(on Windows) orpython3 -m venv env
(on Linux and macOS) - Activate the virtual environment by running
env\Scripts\activate
(on Windows) orsource env/bin/activate
(on Linux and macOS) - Install the required packages by running
pip install -r requirements.txt
- Run the application by running
python spam-classifier.py
- Open a web browser and navigate to
http://localhost:5000
- The application reads a pre-existing dataset of labeled messages from a CSV file.
- It trains a Naive Bayes Classifier using the dataset.
- It uses the trained model to predict whether a given message is spam or not.
- The application displays the prediction result on the web page.
- Detects spam messages using a Naive Bayes Classifier
- Displays the prediction result on the web page
- Allows users to input a message and get a prediction
- The application is not perfect and may make mistakes
- The application does not store any data and does not have any user authentication
- The application is not optimized for performance
This project is licensed under the MIT License. See the LICENSE file for details.
For more details, tutorials, tools, snippets, and resources, visit the website: DocsAllOver.
Follow us on:
and visit our website to know more about our tutorials, tools, snippets, and blogs.