Venksaiabhishek/Phishing-Email-Detecting

Transformer-based phishing email detector with explainability and web deployment.

1

stars

24

commits

Jupyter Notebook

primary language

Sep 8, 2025

updated

README

πŸ›‘οΈ Phishing Email Detection App

Welcome to the Phishing Email Detection App! This web-based application is designed to help you identify whether an email is phishing or legitimate using a combination of powerful machine learning models, including state-of-the-art transformer-based approaches like BERT.

Built with Streamlit, this intuitive app allows users to input email text and receive real-time predictions, helping you stay safer online.

πŸš€ Demo

Experience the app in action:

πŸ‘‰ Click here to try the live app!

✨ Features

  • πŸ” Real-time Prediction: Get instant classification for any email content you provide.
  • πŸ€– Multiple ML Models: Utilizes a diverse set of models for robust detection, including:
    • Logistic Regression
    • Naive Bayes
    • Support Vector Machine (SVM)
    • Random Forest
    • Gradient Boosting
    • BERT (Transformer-based Model)
  • πŸ“ˆ Comprehensive Analysis: Detailed model comparison and performance metrics are available in the included notebooks.
  • βœ… User-Friendly Interface: An easy-to-navigate web interface powered by Streamlit ensures a smooth experience.

πŸ§ͺ Tech Stack

This project leverages the following technologies:

  • Python 3.10+
  • Streamlit: For building the interactive web application.
  • Scikit-learn: For classical machine learning models.
  • Transformers (HuggingFace): For implementing BERT and other transformer models.
  • PyTorch: The deep learning framework for transformer models.
  • Pandas, NumPy: For data manipulation and numerical operations.
  • Matplotlib, Seaborn: For data visualization.

πŸ“ Project Structure

The repository is organized for clarity and maintainability:

Phishing-Email-Detecting/
β”œβ”€β”€ app/
β”‚ └── app.py # Streamlit web application UI
β”œβ”€β”€ src/
β”‚ β”œβ”€β”€ train_model.py # Script for training all machine learning models
β”‚ β”œβ”€β”€ predict.py # Handles predictions for classic ML models
β”‚ └── predict_transformer.py # Handles predictions for BERT-based models
β”œβ”€β”€ models/ # Directory to store saved trained model files
β”œβ”€β”€ notebooks/ # Jupyter notebooks for EDA and model performance comparison
β”œβ”€β”€ data/ # Stores dataset CSVs used for training
β”œβ”€β”€ requirements.txt # List of all project dependencies
└── README.md # This README file

βš™οΈ How to Run Locally

Follow these steps to set up and run the application on your local machine:

  1. Clone the repository:
    git clone https://github.com/Venksaiabhishek/Phishing-Email-Detecting.git
    cd Phishing-Email-Detecting

  2. ** (Optional) Set up a virtual environment (recommended):**
    python -m venv .venv
    # On macOS/Linux:
    source .venv/bin/activate
    # On Windows:
    .venv\Scripts\activate

  3. Install dependencies:
    pip install -r requirements.txt

  4. Run the Streamlit app:
    streamlit run app/app.py

    Your browser should automatically open the app.

πŸ“ Sample Usage

Using the app is straightforward:

  1. Paste your email content into the provided text box.
  2. Click the "Predict" button.
  3. The app will display whether the email is:
    • βœ… Legitimate
    • ❌ Phishing

πŸ“‘ Deployment

This application is designed for easy deployment on Streamlit Cloud. To deploy your own instance:

  1. Push your project to a GitHub repository (like this one!).
  2. Log into your Streamlit Cloud account.
  3. Link your GitHub repository, and Streamlit Cloud will handle the rest!

πŸ‘¨β€πŸ’» Author

Abhishek P.V.S

Explore more of my work on my GitHub portfolio:
πŸ‘‰ Abhishek P.V.S's GitHub Portfolio

πŸ“„ License

This project is licensed under the MIT License. See the LICENSE file in the repository for full details.

Contributors

Venksaiabhishek

24 commits

Venksaiabhishek/Phishing-Email-Detecting

Transformer-based phishing email detector with explainability and web deployment.

1

stars

24

commits

Jupyter Notebook

primary language

Sep 8, 2025

updated

README

πŸ›‘οΈ Phishing Email Detection App

Welcome to the Phishing Email Detection App! This web-based application is designed to help you identify whether an email is phishing or legitimate using a combination of powerful machine learning models, including state-of-the-art transformer-based approaches like BERT.

Built with Streamlit, this intuitive app allows users to input email text and receive real-time predictions, helping you stay safer online.

πŸš€ Demo

Experience the app in action:

πŸ‘‰ Click here to try the live app!

✨ Features

  • πŸ” Real-time Prediction: Get instant classification for any email content you provide.
  • πŸ€– Multiple ML Models: Utilizes a diverse set of models for robust detection, including:
    • Logistic Regression
    • Naive Bayes
    • Support Vector Machine (SVM)
    • Random Forest
    • Gradient Boosting
    • BERT (Transformer-based Model)
  • πŸ“ˆ Comprehensive Analysis: Detailed model comparison and performance metrics are available in the included notebooks.
  • βœ… User-Friendly Interface: An easy-to-navigate web interface powered by Streamlit ensures a smooth experience.

πŸ§ͺ Tech Stack

This project leverages the following technologies:

  • Python 3.10+
  • Streamlit: For building the interactive web application.
  • Scikit-learn: For classical machine learning models.
  • Transformers (HuggingFace): For implementing BERT and other transformer models.
  • PyTorch: The deep learning framework for transformer models.
  • Pandas, NumPy: For data manipulation and numerical operations.
  • Matplotlib, Seaborn: For data visualization.

πŸ“ Project Structure

The repository is organized for clarity and maintainability:

Phishing-Email-Detecting/
β”œβ”€β”€ app/
β”‚ └── app.py # Streamlit web application UI
β”œβ”€β”€ src/
β”‚ β”œβ”€β”€ train_model.py # Script for training all machine learning models
β”‚ β”œβ”€β”€ predict.py # Handles predictions for classic ML models
β”‚ └── predict_transformer.py # Handles predictions for BERT-based models
β”œβ”€β”€ models/ # Directory to store saved trained model files
β”œβ”€β”€ notebooks/ # Jupyter notebooks for EDA and model performance comparison
β”œβ”€β”€ data/ # Stores dataset CSVs used for training
β”œβ”€β”€ requirements.txt # List of all project dependencies
└── README.md # This README file

βš™οΈ How to Run Locally

Follow these steps to set up and run the application on your local machine:

  1. Clone the repository:
    git clone https://github.com/Venksaiabhishek/Phishing-Email-Detecting.git
    cd Phishing-Email-Detecting

  2. ** (Optional) Set up a virtual environment (recommended):**
    python -m venv .venv
    # On macOS/Linux:
    source .venv/bin/activate
    # On Windows:
    .venv\Scripts\activate

  3. Install dependencies:
    pip install -r requirements.txt

  4. Run the Streamlit app:
    streamlit run app/app.py

    Your browser should automatically open the app.

πŸ“ Sample Usage

Using the app is straightforward:

  1. Paste your email content into the provided text box.
  2. Click the "Predict" button.
  3. The app will display whether the email is:
    • βœ… Legitimate
    • ❌ Phishing

πŸ“‘ Deployment

This application is designed for easy deployment on Streamlit Cloud. To deploy your own instance:

  1. Push your project to a GitHub repository (like this one!).
  2. Log into your Streamlit Cloud account.
  3. Link your GitHub repository, and Streamlit Cloud will handle the rest!

πŸ‘¨β€πŸ’» Author

Abhishek P.V.S

Explore more of my work on my GitHub portfolio:
πŸ‘‰ Abhishek P.V.S's GitHub Portfolio

πŸ“„ License

This project is licensed under the MIT License. See the LICENSE file in the repository for full details.

Contributors

Venksaiabhishek

24 commits

Languages

Jupyter Notebook

95.6%

Python

4.4%