zefang-liu/phishing-email-dataset
Viewer โข Updated โข 18.7k โข 2.06k โข 41
How to use dravyaaa/phishing-email-detector with Transformers:
# Use a pipeline as a high-level helper
from transformers import pipeline
pipe = pipeline("text-classification", model="dravyaaa/phishing-email-detector") # pip install -U transformers accelerate
# Load model directly
from transformers import AutoTokenizer, AutoModelForSequenceClassification
tokenizer = AutoTokenizer.from_pretrained("dravyaaa/phishing-email-detector")
model = AutoModelForSequenceClassification.from_pretrained("dravyaaa/phishing-email-detector", device_map="auto")distilroberta-base fine-tuned to classify an email body as safe or phishing.
| Model | Accuracy | F1 (phishing) |
|---|---|---|
| TF-IDF + Logistic Regression (baseline) | 98.91% | 0.9854 |
| This model | 98.63% | 0.9816 |
from transformers import pipeline
clf = pipeline("text-classification", model="dravaya/phishing-email-detector", truncation=True, max_length=256)
clf("Your account has been suspended. Verify your identity at http://secure-login-update.com")
The training data mixes Enron corporate mail and mid-2000s spam, so part of what the model learns is the source and era of an email rather than phishing intent. Expect lower accuracy on modern phishing. Inputs are truncated to 256 tokens. Research/learning project, not a production filter.
Base model
distilbert/distilroberta-base