Skip to content

Latest commit

 

History

6 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SpamClassifierApp

A simple SMS Spam Classifier built with Python and Streamlit.
Users can enter a message and the app predicts whether it is spam or ham using a trained machine learning model.

Features

  • Classifies SMS/text messages as spam or ham
  • Clean Streamlit interface
  • Uses a Linear SVC model, trained from scratch
  • Includes a saved text vectorizer
  • Lightweight and easy to run locally

Project Structure

  • app.py — Streamlit application
  • LinSVC.joblib — trained spam classification model
  • vectorizer.joblib — text vectorizer
  • requirements.txt — Python dependencies

How It Works

  1. The user enters a message in the app.
  2. The text is converted to lowercase and cleaned.
  3. The message is transformed using the saved vectorizer.
  4. The trained model predicts whether the message is:
    • spam
    • ham

Installation

Clone the repository:

git clone https://github.com/DarkRaiderCB/SpamClassifierApp.git
cd SpamClassifierApp

Create and activate a virtual environment:

python -m venv venv

On Windows

venv\Scripts\activate

On macOS/Linux

source venv/bin/activate

Install dependencies:

pip install -r requirements.txt

Run the App

Start the Streamlit app with:

streamlit run app.py

Then open the local URL shown in the terminal.

Usage

  1. Paste or type a text message into the input box.
  2. Click Classify.
  3. View the prediction result.

Requirements

  • Python 3.9+
  • Streamlit
  • pandas
  • scikit-learn
  • joblib

Notes

  • The model and vectorizer are already included in the repository.
  • No training step is required to run the app.
  • This project is intended as a simple demonstration of spam detection with machine learning.

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages