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.
- 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
app.py— Streamlit applicationLinSVC.joblib— trained spam classification modelvectorizer.joblib— text vectorizerrequirements.txt— Python dependencies
- The user enters a message in the app.
- The text is converted to lowercase and cleaned.
- The message is transformed using the saved vectorizer.
- The trained model predicts whether the message is:
spamham
Clone the repository:
git clone https://github.com/DarkRaiderCB/SpamClassifierApp.git
cd SpamClassifierAppCreate and activate a virtual environment:
python -m venv venvvenv\Scripts\activatesource venv/bin/activateInstall dependencies:
pip install -r requirements.txtStart the Streamlit app with:
streamlit run app.pyThen open the local URL shown in the terminal.
- Paste or type a text message into the input box.
- Click Classify.
- View the prediction result.
- Python 3.9+
- Streamlit
- pandas
- scikit-learn
- joblib
- 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.