Tauqueer Alam

View Demo

SMS Spam Detection Using NLP and Machine Learning โ€” A Complete Project Overview

With the increasing use of messaging platforms, spam messages have become a daily nuisance for users. From fake lottery wins to phishing links, spam SMS poses both annoyance and threat. To address this, I developed a Spam SMS Detection System using Natural Language Processing (NLP) and Machine Learning, integrated into a user-friendly web interface using Flask.

โœ… Project Objective

The primary goal of this project is to classify an input SMS message as either "Spam" or "Ham" (not spam). It analyzes the content of the text using machine learning models trained on real-world SMS data.

๐Ÿง  Tools & Technologies Used

๐Ÿ“Š Dataset Used

I used the SMS Spam Collection Dataset, a popular dataset containing over 5,000 labeled messages (ham or spam).

๐Ÿ› ๏ธ Steps Involved

1. Data Preprocessing

2. Feature Extraction

Used TF-IDF Vectorization to convert text into numerical features suitable for ML models.

3. Model Training

Evaluated using accuracy, precision, recall, and F1-score. Multinomial Naive Bayes performed best.

4. Web App with Flask

Built a user interface where users can enter SMS messages. On submission, the message is processed by the model and returns whether it is spam or not.

5. Model Deployment

Used pickle to save/load the model and deployed the app using Hugging Face Spaces.

๐ŸŒ User Interface Preview

Clean and responsive. Users input a message and get instant classification feedback.

(You can add a screenshot here)

Interface Screenshot

๐Ÿงช Try It Live

Click here to try the Spam Detector App

๐Ÿ“ฆ GitHub Repository

GitHub Repository - SMS Spam Detection

๐Ÿš€ What's Next?

๐Ÿ“Œ Final Thoughts

This project not only strengthened my understanding of machine learning and NLP, but also gave me hands-on experience with Flask app deployment. I believe such systems can reduce spam and phishing attempts if integrated with real-time platforms.

If you're interested in machine learning, this is a great project to start with!


๐Ÿ”— Connect with Me
๐ŸŒ www.tauqueeralam.com
๐Ÿ“ฑ LinkedIn | GitHub

You can check out the full project on my GitHub or view a live demo below:

View Demo