Skip to content

pranavsoh/spamClassifier

Repository files navigation


📱 SMS Spam Classifier

A web application that predicts whether a given message is Spam or Not Spam using Machine Learning (ML) and Natural Language Processing (NLP).

Built with Python, Flask, NLTK, and Scikit-learn.


🧩 1. Setup the Virtual Environment

Option 1 — Using Conda

# Create a new conda environment
conda create -p venv python=3.9 -y

# Activate the environment
conda activate venv/

Option 2 — Using Virtualenv

# Install virtualenv if not already installed
pip install virtualenv

# Create a virtual environment
virtualenv venv

# Activate the environment
venv\Scripts\activate       # (Windows)
source venv/bin/activate    # (Linux/Mac)

⚠️ Note: Do not mix Conda and Virtualenv in the same project. Use only one method.


📦 2. Install Dependencies

Once the environment is active, install all required packages:

pip install -r requirements.txt

📓 3. Set Up Jupyter Notebook

If you want to explore or train models in Jupyter:

pip install ipykernel
pip install jupyter notebook

Then launch the notebook:

jupyter notebook

🚀 4. Run the Application

Run the Flask application:

python app.py

Now open your browser and go to: 👉 http://127.0.0.1:5000/


🌐 5. Deploy on Render.com

  1. Go to https://dashboard.render.com/web.
  2. Click New → Web Service.
  3. Choose Build and deploy from a Git repository, then click Next.
  4. Configure your repository settings as shown in the screenshots.
  5. Click Manual Deploy → Deploy Latest Commit.
  6. Wait 2–3 minutes for deployment to complete.

🙌 Conclusion

This project demonstrates Text Classification using Machine Learning and Natural Language Processing (NLP), integrated into a Flask web application and deployed on Render.

It’s a simple yet effective example of how to turn an ML model into a real-world web service.


About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •  

Languages