Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/goldsharon/spamshield

SpamShield is a Flask-based web application that employs machine learning to swiftly identify and flag spam content in emails and text messages, offering users real-time protection against unwanted solicitations. With an intuitive interface and privacy-conscious design, SpamShield ensures efficient spam detection while safeguarding user privacy
https://github.com/goldsharon/spamshield

email-filtering flask-application machine-learning naive-bayes-classifier privacy-conscious-design real-time-protection spam-detection spam-identification text-message-filtering user-friendly-interface

Last synced: 6 days ago
JSON representation

SpamShield is a Flask-based web application that employs machine learning to swiftly identify and flag spam content in emails and text messages, offering users real-time protection against unwanted solicitations. With an intuitive interface and privacy-conscious design, SpamShield ensures efficient spam detection while safeguarding user privacy

Awesome Lists containing this project

README

        

# SpamShield: Spam Detection Flask Application

## Overview
SpamShield is a web-based application designed to detect spam messages using a machine learning model. It leverages Flask for the web framework and a Naive Bayes classifier for the spam detection model. The application provides an easy-to-use interface where users can input their messages and receive instant feedback on whether the message is spam or not.

## Features
- **User-Friendly Interface**: Clean and intuitive design for easy interaction.
- **Real-Time Spam Detection**: Immediate results upon message submission.
- **Advanced AI Technology**: Utilizes a Naive Bayes classifier for accurate spam detection.
- **Privacy Assurance**: No data is stored or shared; user inputs are processed in real-time and discarded.

## Project Structure

SpamShield/



├── app.py # Main application file

├── templates/

│ ├── index.html # Home page template

│ └── predict.html # Result page template

├── models/

│ ├── Spam_Model.joblib # Pre-trained model

│ └── Vectorizer.joblib # Vectorizer for text transformation

├── README.md # Project README file

└── requirements.txt # Python dependencies

## Installation
1. **Clone the repository**:
```sh
git clone https://github.com/GoldSharon/SpamShield.git
cd SpamShield
```

2. **Set up a virtual environment**:
```sh
python -m venv venv
source venv/bin/activate # On Windows, use `venv\Scripts\activate`
```

3. **Install dependencies**:
```sh
pip install -r requirements.txt
```

4. **Download the pre-trained model and vectorizer**:
- Place `Spam_Model.joblib` and `Vectorizer.joblib` in the `models/` directory.

## Usage
1. **Run the application**:
```sh
python app.py
```

2. **Access the web interface**:
Open your web browser and navigate to `http://127.0.0.1:5000/`.

3. **Check for spam**:
- Enter the message you want to check in the provided text box.
- Click the "Check" button to get the result.

## Dependencies
- Flask
- scikit-learn
- joblib
- numpy

Install dependencies using:
```sh
pip install -r requirements.txt
```
## Contributing
Contributions are welcome! Please submit a pull request or open an issue to discuss improvements or suggestions.

## License
This project is licensed under the MIT License. See the LICENSE file for details.

## Acknowledgements
The Naive Bayes model and TF-IDF vectorizer were trained using the scikit-learn library.
Flask framework for the web application.