Skip to content

AliAminiCode/Spam-Detector

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Spam-Detector

A lightweight Python-based SMS spam detector using NLP, SVM, and Flet for spam/ham classification.

Overview

Spam-Detector classifies SMS messages as spam or ham using Natural Language Processing (NLP) for text preprocessing, a Support Vector Machine (SVM) for machine learning-based classification, and a Flet GUI for user interaction. It offers a simple interface with theme switching and a standalone executable for offline use. Key features:

  • NLP: Tokenization, stemming, and stopword removal for message preprocessing.
  • SVM: Accurate spam/ham classification using a trained model.
  • Flet GUI: User-friendly interface for instant predictions with light/dark theme support.
  • Offline support with bundled models and NLTK data.
  • Error handling displayed in the GUI.

Installation

  1. Clone the repository:
    git clone https://github.com/AliAminiCode/Spam-Detector.git
    cd Spam-Detector
  2. Install dependencies:
    pip install -r requirements.txt
  3. Download NLTK data:
    python -c "import nltk; nltk.download('stopwords'); nltk.download('punkt_tab')"

Usage

Run the GUI:

python src/spam_detector_app.py

Enter a message (e.g., "Win a free iPhone!" for spam) to see predictions.

To train the model:

python src/train_spam_classifier.py

Screenshots

Check out Spam-Detector in action:

  • Ham Prediction(Dark Mode):
    Ham Prediction(Dark Mode)

  • Spam Prediction(Light Mode):
    Spam Prediction(Light Mode)

Download Executable

Try the standalone executable, which runs completely offline without needing an internet connection: exe-v1.0 release:

Download Exe

Contribute

Found a bug? Report it at https://github.com/AliAminiCode/Spam-Detector/issues.
Developed by Ali Amini.
Licensed under the MIT License.

About

A Python-based SMS spam detector using SVM, featuring a Flet GUI and standalone executable for easy spam/ham classification.

Topics

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages