This repository contains a comprehensive spam detection system consisting of a Flask web application and a Chrome browser extension. This project provides users with multiple ways to identify spam content using a trained Naive Bayes model.
This repository contains two main components in separate folders:
- Flask Web Application: A standalone web interface for spam detection
- Chrome Extension: A browser extension that integrates spam detection directly into your browser
- Real-time spam detection
- User-friendly web interface
- Chrome extension for seamless integration
- Local deployment
Before running this project, ensure you have the following installed:
- Python 3.7 or higher
- Visual Studio Code (recommended)
- Google Chrome browser
- pip (Python package installer)
git clone <your-repository-url>
cd <repository-name>Navigate to the project root directory and install the required packages:
pip install -r requirements.txtThis will install Flask, flask-cors, numpy, and other necessary dependencies.
- Open Visual Studio Code
- Open the
spam_appfolder in VS Code - Open a new terminal in VS Code (Terminal → New Terminal)
- Run the Flask application:
python app.py
- The terminal will display a localhost URL
- Open your web browser and navigate to the provided localhost URL
- The spam detection web interface should now be accessible
- Open Visual Studio Code
- Open the
spam_extensionfolder in VS Code - Open a new terminal in VS Code
- Run the Flask backend for the extension:
python app.py
- Keep this terminal running in the background
- Open Google Chrome
- Navigate to
chrome://extensionsin your address bar - Enable "Developer mode" using the toggle in the top-right corner
- Click "Load unpacked"
- Browse to and select the
spam_extensionfolder from this repository - The extension should now appear in your Chrome extensions bar
- You can now use the extension while browsing
- Navigate to the Flask app URL
- Enter text content you want to check
- Receive spam classification results
- Click the extension icon in your Chrome toolbar
- Use the interface to analyze content on the current page or input custom text
- View spam detection results directly in your browser
- Port already in use: If you see an error about the port being in use, modify the port number in
app.py - Module not found errors: Verify all required Python packages are installed using pip
This project was completed as part of my M.S. Data Science capstone project to demonstrate integration of classical machine learning techniques with modern application deployment and user interaction design.
If you have questions, feel free to reach out!