File size: 931 Bytes
bf31708 7f98488 bf31708 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 | ---
pipeline_tag: text-classification
tags:
- phishing-detection
- mobilebert
- emails
license: apache-2.0
---
# MobileBERT for Phishing Email Detection
This model is a fine-tuned MobileBERT for binary phishing-vs-legitimate email classification.
## Usage
Python (transformers):
```python
from transformers import AutoTokenizer, AutoModelForSequenceClassification
import torch
tok = AutoTokenizer.from_pretrained("Perth0603/phishing-email-mobilebert")
mdl = AutoModelForSequenceClassification.from_pretrained("Perth0603/phishing-email-mobilebert")
inputs = tok(["Win an iPhone! Click here"], return_tensors="pt")
with torch.no_grad():
pred = mdl(**inputs).logits.softmax(-1)
print(pred)
```
HF Inference API (public models only):
```bash
curl -X POST https://api-inference.huggingface.co/models/Perth0603/phishing-email-mobilebert -H "Content-Type: application/json" -d '{"inputs": "Win an iPhone! Click here"}'
``` |