This web application allows users to classify email or SMS messages as spam or not spam using a pre-trained machine learning model.
This application consists of a React front end and a Flask back end. The front end provides a user interface for inputting messages and displaying the classification results, while the back end serves the machine learning model and handles prediction requests.
-
Clone the Repository:
git clone <repository-url>
-
Navigate to the Project Directory:
cd <project-directory>
-
Install Dependencies for the React Front End:
npm install
-
Install Dependencies for the Flask Back End:
pip install -r requirements.txt
-
Start the Flask Server:
python app.py
The Flask server will start running at http://localhost:5000.
-
Start the React Front End:
npm run dev
The React app will open in your default web browser at http://localhost:5173.
-
Enter a Message: Enter a message in the input field and click the "Predict" button to classify it as spam or not spam.
Contributions are welcome! If you'd like to contribute to this project, please follow these steps:
- Fork the Repository.
- Create a New Branch:
git checkout -b feature/my-feature
- Make Changes and Commit:
git commit -am "Add my feature"
- Push Changes to Your Fork:
git push origin feature/my-feature
- Submit a Pull Request to the
main
Branch of the Original Repository.
This project is licensed under the MIT License. See the LICENSE file for details.
-
This project uses the following libraries and frameworks:
-
The machine learning model used in this project was trained using the SMS Spam Collection dataset.