A SSpam Email Classifier application built with Python and Streamlit. It offers an interactive interface for predicting whether an email is Spam or Not Spam, with detailed probability scores, text input, and file upload support. The project uses a pre-trained model for robust predictions and features a user-friendly design.
- Interactive Interface: A user-friendly Streamlit interface.
- Text Input: Allows users to input email text directly.
- File Upload: Accepts
.txt
files containing email content. - Detailed Results:
- Displays prediction as "Spam" or "Not Spam."
- Shows probabilities for both categories.
- Custom Styling: Enhanced aesthetics with styled headers, buttons, and footers.
- Programming Language: Python
- Framework: Streamlit
- Libraries: Scikit-learn, Joblib
- Python: Ensure Python (>=3.8) is installed.
- Streamlit: Install using pip.
pip install streamlit
- Joblib: Ensure joblib is installed.
pip install joblib
-
Clone the Repository:
git clone https://github.com/your-username/SpamEmailClassifierApp.git cd SpamEmailClassifierApp
-
Add the Pre-trained Model:
- Save the trained model (
spam_classifier_model.pkl
) and vectorizer (count_vectorizer.pkl
) in the project directory.
- Save the trained model (
-
Run the App:
streamlit run app.py
-
Access the App:
- Open the URL displayed in the terminal (default: http://localhost:8501/).
- Direct Text Input:
- Paste email content into the provided text box.
- File Upload:
- Upload a
.txt
file containing the email content.
- Upload a
- Prediction:
- Displays whether the email is "Spam" or "Not Spam."
- Probabilities:
- Shows the likelihood of the email belonging to each category.
- Deployment:
- Deploy on platforms like Heroku or Streamlit Cloud.
- Enhanced Visualization:
- Add graphical visualizations for probabilities.
- Additional Input Formats:
- Support for PDF and DOCX file uploads.
This project is licensed under the MIT License.
- Streamlit Documentation: Streamlit
- Scikit-learn: Scikit-learn