Skip to content

Adagedo/sms-spam-detector-sklearn

Repository files navigation

📂 SMS Spam Detection

This project classifies SMS messages as spam or ham (not spam). It compares multiple classifiers and vectorizers to determine the best performance.

Features

Classifiers:

  • DecisionTreeClassifier

  • CalibratedClassifierCV

  • DummyClassifier

  • PassiveAggressiveClassifier

  • RidgeClassifier

Vectorizers:

  • CountVectorizer

  • TfidfVectorizer

  • HashingVectorizer

FastApi

  • fastapi is a python pacakge for building scalable backend apis
  • for more info about fastapi you can my github repo on fastapi implementations

Dataset:

  • A CSV file containing SMS messages labeled as either "spam" or "ham".

Usage

  • clone this repo with git clone https://github.com/Adagedo/sms-spam-detector-sklearn.git
  • install dependencies with pip install requirement.txt
  • After running the model, you should see an output like this. the score
  • To run the application, uvicorn main:app --reload
  • what you will see INFO: Uvicorn running on http://localhost:8000 (Press CTRL+C to quit) \n INFO:Started reloader process [8976] using WatchFiles
  • api test input
  • api test output
  • api test sapm
  • api test sapm res

📝 Notes

The CSV file should have at least two columns:

  • v1: label (ham/spam)

  • v2: message text

Results are printed to the console or just take a look at the csv file.

About

A machine learning model that detect spam sms

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages