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
- Host: GitHub
- URL: https://github.com/kane-dylan/spamshield
- Owner: Kane-dylan
- Created: 2025-01-25T08:03:35.000Z (about 1 year ago)
- Default Branch: master
- Last Pushed: 2025-02-04T08:22:31.000Z (about 1 year ago)
- Last Synced: 2025-02-13T17:52:07.563Z (12 months ago)
- Topics: mechine-learing, numpy, pandas, python, scikit-learn, scipy, streamlit
- Language: Jupyter Notebook
- Homepage: https://spam-shield-dz46.onrender.com/
- Size: 299 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
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!