--- title: Malicious Email & URL Detector v2 emoji: 🛡️ colorFrom: red colorTo: yellow sdk: streamlit sdk_version: 1.43.2 app_file: app.py pinned: false short_description: A web app for detecting malicious emails and URLs --- # Malicious Email & URL Detector v2 A lightweight **Streamlit** web application that utilizes a fine-tuned deep learning model to detect malicious content in emails and URLs. The app helps individuals and organizations identify threats such as **phishing** and **malware** before any harm can occur. --- ## Key Features - **Real-Time Detection** Quickly classifies emails or URLs as **malicious** or **benign** using a fine-tuned transformer model. - **User-Friendly Interface** Paste the email text or URL, then click a button—no advanced knowledge required. - **Lightweight & Fast** Built on Streamlit for a snappy, interactive experience. --- ## How It Works 1. **Model** A fine-tuned variant of [distilroberta-base](https://huggingface.co/distilroberta-base) trained on a curated dataset of phishing, malware, and legitimate examples. 2. **Input** Users provide either an email’s textual content or a single URL. The app normalizes and processes the input. 3. **Inference** The model returns a **label** (malicious/benign) and a **confidence score**, enabling quick decisions on blocking or flagging potential threats. --- ## Quickstart 1. **Clone the Repository** ```bash git clone https://huggingface.co/spaces/your-username/Malicious-Email-and-URL-Detector-v2 cd Malicious-Email-and-URL-Detector-v2 2. **Install Dependencies** pip install -r requirements.txt 3. **Run the App** streamlit run app.py 4. **Use It** Step 1: Paste the email content or URL into the input box. Step 2: Click Analyze. Step 3: View the output displaying the classification (malicious or benign) and the confidence score. 6. **Example** Input: "Hello, your account has been locked. Please verify at http://suspicious-link.com" Output: Malicious (Confidence: 0.95) ## Limitations Limitations False Positives/Negatives: No model is perfect. Always combine with other security measures. Dataset Bias: Performance depends on how well the training data represents real-world threats. Evolving Threats: Regular updates are recommended to keep pace with new phishing or malware tactics. ## Contact Author: Eason Liu