This project classifies SMS messages as spam or ham (not spam). It compares multiple classifiers and vectorizers to determine the best performance.
-
DecisionTreeClassifier
-
CalibratedClassifierCV
-
DummyClassifier
-
PassiveAggressiveClassifier
-
RidgeClassifier
-
CountVectorizer
-
TfidfVectorizer
-
HashingVectorizer
- fastapi is a python pacakge for building scalable backend apis
- for more info about fastapi you can my github repo on fastapi implementations
- A CSV file containing SMS messages labeled as either "spam" or "ham".
- 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.

- 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

- api test

- api test

- api test

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.