Skip to content

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

License

Notifications You must be signed in to change notification settings

GoldSharon/SpamShield

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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:

    git clone https://github.com/GoldSharon/SpamShield.git
    cd SpamShield
  2. Set up a virtual environment:

    python -m venv venv
    source venv/bin/activate  # On Windows, use `venv\Scripts\activate`
  3. Install dependencies:

    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:

    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:

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.

About

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

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published