SMS-Spam-Filter π¨ utilizes TensorFlow and Keras to detect spam SMS messages. Trained on the SMS Spam Collection Dataset π©, it preprocesses data, visualizes insights, builds a model, and evaluates accuracy for improved spam detection βοΈ.
-
Clone the repository:
git clone https://github.com/your-username/spam-sms-detection.git cd spam-sms-detection
-
Install the required libraries:
pip install pandas matplotlib seaborn wordcloud tensorflow keras scikit-learn
The dataset used is the SMS Spam Collection Dataset, consisting of SMS labeled as ham (legitimate) or spam.
-
Load and explore the dataset:
import pandas as pd data = pd.read_csv("/content/SMSSpamCollection", sep='\t', names=["label", "message"])
-
Visualize the data using word clouds
The model uses an Embedding layer followed by a GlobalAveragePooling1D layer and Dense layers