An AI-powered web app that detects spam / scam messages and automatically generates a safe reply to protect users from fraud. Built using Python, Streamlit, TF-IDF, and Naive Bayes, this app provides instant classification, dataset insights, accuracy visualization, and a clean modern UI.
🚀 Live Demo
👉 ( Streamlit Cloud link ) https://spamshieldml.streamlit.app/
🛡️ Features
🔍 Smart Spam Detection
Uses TF-IDF + Multinomial Naive Bayes
Detects whether a message is Spam or Not Spam
🛡️ Safe Auto-Reply Generator
Generates a safe, non-sensitive reply for spam messages
Helps users avoid scams and phishing traps
📊 Model Accuracy Visualization
Displays model accuracy in %
Includes a compact bar graph with annotation
⚡ Real-Time Classification
Classifies any email, SMS, WhatsApp message instantly
Clean input box with one-click detection
📚 Dataset Integration
Processes your custom dataset
Supports categories: ham and spam
💎 Modern UI & Layout
Clean cards, icons, soft colors
Fully responsive layout built with Streamlit
🧠 Tech Stack Component Technology Frontend Streamlit Machine Learning TF-IDF Vectorizer, Multinomial Naive Bayes Model Evaluation Accuracy, Confusion Matrix Language Python 3 Deployment Streamlit Cloud
📂 Project Structure 📁 SpamShield/ │── app.py │── mail_data.csv │── requirements.txt │── README.md
1. Install dependencies pip install -r requirements.txt
2. Run the app streamlit run app.py
📦 requirements.txt (recommended) streamlit pandas numpy scikit-learn matplotlib
🌐 Deployment (Streamlit Cloud)
Push your project to GitHub
Go to streamlit.io → Deploy
Select your repo
Set Main file path to:
app.py
Choose any available subdomain
Deploy!
Built as a mini-project: SpamShield – Email & SMS Spam Classifier with Safe Reply Drafting Made with ❤️ using Python & Streamlit © 2025 SpamShield