This is a Flask web application that uses RNN to filter messages into spam or not-spam. Users input the message, and the trained model outputs if the message is spam.
- Python 3.9+
- Flask (web application framework)
- pandas, numpy, nltk (data handling)
- tensorflow, keras-tuner (RNN)
- matplotlib, seaborn, wordcloud (for data analysis)
- dill (for saving)
- kaggle (for dataset download)
- Data Ingestion - load and split dataset
- Data Transformation - preprocessing and feature engineering
- Model Training - train and evaluate RNN models
- Prediction Pipeline - reusable pipeline for inference
- Flask Web App - interactive UI for predictions
git clone https://github.com/Hanna-hk/Spam_Filter.git
cd Spam_Filterpython -m venv venv
source venv/bin/activate # Linux/Mac
venv\Scripts\activate # Windowspip install -r requirements.txtpython app.pyhttp://127.0.0.1:5000/
- Enter your message in the text box
- Click the "Classify" button
- View the results (Spam or Not Spam)
- See the confidence level of the prediction
The RNN model achieves high accuracy in classifying messages with:
- Loss: 12.17%
- Accuracy: 98.58%
- Precision: 95.70%
- Recall: 92.71%