Text Classification
Transformers
ONNX
Safetensors
English
roberta
phishing
email
cybersecurity
text-embeddings-inference
Run this model with HF Jobs
Run dravyaaa/phishing-email-detector on Hugging Face's managed compute, monitor its progress, and retrieve the results when it's done.
Paste one of these prompts into your coding agent:
Fine-tune on my dataset
Use HF Jobs to fine-tune https://huggingface.co/dravyaaa/phishing-email-detector. Ask me which dataset to train on, then push the fine-tuned model to a new model repo. Run `hf jobs --help` first to learn the CLI.
Run batch inference
Use HF Jobs to run batch inference with https://huggingface.co/dravyaaa/phishing-email-detector on the inputs in a mounted HF Bucket. Ask me which Bucket to use, then write the outputs back to it and keep each input ID. Run `hf jobs --help` first to learn the CLI.
Instructions to use dravyaaa/phishing-email-detector with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
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") - Notebooks
- Google Colab
- Kaggle
Dravya Patell commited on
Upload fine-tuned phishing detector
Browse filesFiles changed (5)
- README.mdAdded+41
- config.jsonAdded+37
- model.safetensorsAdded+3
- tokenizer.jsonAdded
- tokenizer_config.jsonAdded+17
1234567891011121314151617181920212223242526272829303132333435363738394041---license: mitlanguage: enlibrary_name: transformerspipeline_tag: text-classificationbase_model: distilroberta-basedatasets:- zefang-liu/phishing-email-datasettags:- phishing- email- cybersecurity---
# Phishing Email Detector (DistilRoBERTa)
`distilroberta-base` fine-tuned to classify an email body as **safe** or **phishing**.
- Code & notebook: https://github.com/dravyaaa/phishing-email-detector- Live demo: https://huggingface.co/spaces/dravaya/phishing-email-detector-demo
## Test-set results (1,751 held-out emails)
| Model | Accuracy | F1 (phishing) ||---|---|---|| TF-IDF + Logistic Regression (baseline) | 98.91% | 0.9854 || **This model** | 98.63% | 0.9816 |
## Usage
```pythonfrom transformers import pipelineclf = 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")```
## Limitations
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.12345678910111213141516171819202122232425262728293031323334353637{ "add_cross_attention": false, "architectures": [ "RobertaForSequenceClassification" ], "attention_probs_dropout_prob": 0.1, "bos_token_id": 0, "classifier_dropout": null, "dtype": "float32", "eos_token_id": 2, "hidden_act": "gelu", "hidden_dropout_prob": 0.1, "hidden_size": 768, "id2label": { "0": "safe", "1": "phishing" }, "initializer_range": 0.02, "intermediate_size": 3072, "is_decoder": false, "label2id": { "phishing": 1, "safe": 0 }, "layer_norm_eps": 1e-05, "max_position_embeddings": 514, "model_type": "roberta", "num_attention_heads": 12, "num_hidden_layers": 6, "pad_token_id": 1, "problem_type": "single_label_classification", "tie_word_embeddings": true, "transformers_version": "5.22.1", "type_vocab_size": 1, "use_cache": false, "vocab_size": 50265}123version https://git-lfs.github.com/spec/v1oid sha256:7f160f31ae5860ff74cd28181376a392d939793a107b00b2d785216a60e20858size 3284922801234567891011121314151617{ "add_prefix_space": false, "backend": "tokenizers", "bos_token": "<s>", "cls_token": "<s>", "eos_token": "</s>", "errors": "replace", "is_local": false, "local_files_only": false, "mask_token": "<mask>", "model_max_length": 512, "pad_token": "<pad>", "sep_token": "</s>", "tokenizer_class": "RobertaTokenizer", "trim_offsets": true, "unk_token": "<unk>"}README.mdAdded+41
config.jsonAdded+37
model.safetensorsAdded+3
tokenizer.jsonAdded
tokenizer_config.jsonAdded+17