An open API service indexing awesome lists of open source software.

https://github.com/kane-dylan/spamshield

SpamShield
https://github.com/kane-dylan/spamshield

mechine-learing numpy pandas python scikit-learn scipy streamlit

Last synced: about 1 month ago
JSON representation

SpamShield

Awesome Lists containing this project

README

          

# πŸš€ **SpamShield: SMS Spam Detection**

πŸ” **Predict Spam or Not in a Click!**

## πŸ“Œ **Overview**
SpamShield is an AI-powered SMS spam detection model that analyzes incoming messages and predicts whether they are **spam 🚨** or **safe βœ…**. Built with **Python & Machine Learning**, this tool helps keep your inbox clean and spam-free!

🎯 **What It Does:**
- Takes an SMS as input πŸ“©
- Predicts **Spam or Not Spam** instantly ⚑
- Uses a robust **Machine Learning model** for accuracy 🎯
- Hosted on the web using **Streamlit** 🌐

πŸ“’ **Try the Live Demo** πŸ‘‰ [SpamShield](https://spam-shield-dz46.onrender.com/)

---

## πŸ› οΈ **Tech Stack**
πŸ”Ή **Programming Language:** Python 🐍
πŸ”Ή **ML Libraries:** Scikit-learn πŸ€–, Pandas πŸ“Š, NumPy πŸ”’
πŸ”Ή **Web Deployment:** Streamlit πŸš€

---

## ⚑ **Key Features**
βœ… **Data Collection & Preprocessing** πŸ—‚οΈ
βœ… **Exploratory Data Analysis (EDA)** πŸ“Š
βœ… **Machine Learning Model Selection** πŸ€–
βœ… **Web Interface for Predictions** 🌍
βœ… **Deployed & Ready to Use!** 🎯

---

## πŸ“Š **Data Collection & Processing**
πŸ“Œ **Dataset Source:** [Kaggle SMS Spam Collection](https://www.kaggle.com/datasets/uciml/sms-spam-collection-dataset)
πŸ“Œ **5,500+ labeled SMS messages** πŸ“¨
πŸ“Œ **Preprocessing Steps:**
- Handling missing & duplicate values 🧹
- Label encoding the "type" column 🏷️
- Tokenizing text βœ‚οΈ
- Removing **special characters, stopwords & punctuation** πŸ”
- Converting text to lowercase πŸ”‘
- Stemming words for better feature extraction 🌱

---

## πŸ“ˆ **Exploratory Data Analysis (EDA)**
We analyzed the dataset using various techniques:
πŸ“Š **Visualizations:** Bar Charts πŸ“Š | Pie Charts πŸ₯§ | Heatmaps πŸ”₯
πŸ“œ **Word Frequency Analysis** πŸ“
🌎 **Word Cloud for Spam & Non-Spam Messages** ☁️
πŸ“Œ **Message Length Analysis (Characters, Words, Sentences)**

---

## πŸ† **Machine Learning Model Selection**
We tested multiple classifiers to find the best:
βœ… **NaΓ―ve Bayes** 🟒
βœ… **Random Forest** 🌳
βœ… **K-Nearest Neighbors (KNN)** πŸ“Œ
βœ… **Decision Tree** 🌱
βœ… **Logistic Regression** πŸ“‰
βœ… **ExtraTreesClassifier** πŸƒ
βœ… **Support Vector Classifier (SVC)** πŸ’»

πŸ”₯ **Best Model:** Achieved **100% Precision** for spam detection!

---

## 🌐 **Web Deployment**
πŸ’‘ **Built with Streamlit** for a smooth user experience!
πŸ“ **How It Works:**
1️⃣ Enter an SMS message
2️⃣ Click **Predict**
3️⃣ Get instant results (**Spam 🚨 or Not Spam βœ…**)

πŸ”— **Live Demo:** [SpamShield](https://spam-shield-dz46.onrender.com/)

---

## πŸ› οΈ **Installation & Usage**

Want to run SpamShield locally? Follow these steps:

### 1️⃣ **Clone the Repository**
```
git clone https://github.com/Kane-dylan/SpamShield.git
cd SpamShield
```

### 2️⃣ **Install Dependencies**
```
pip install -r requirements.txt
```

### 3️⃣ **Run the App**
```
streamlit run app.py
```
πŸ’‘ Now open your browser and start detecting spam! πŸš€

---

## 🀝 **Contributions & Feedback**
I ❀️ contributions! If you:
- βœ… **Found a bug** 🐞
- βœ… **Have a feature request** 🌟
- βœ… **Want to improve the model** πŸ“ˆ

Feel free to open an issue or pull request at πŸ‘‰ [GitHub Repo](https://github.com/Kane-dylan/SpamShield.git)

πŸš€ Let's build a spam-free future together!