Add model card
Browse files
README.md
ADDED
|
@@ -0,0 +1,34 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
pipeline_tag: text-classification
|
| 3 |
+
tags:
|
| 4 |
+
- phishing-detection
|
| 5 |
+
- mobilebert
|
| 6 |
+
- emails
|
| 7 |
+
license: apache-2.0
|
| 8 |
+
---
|
| 9 |
+
|
| 10 |
+
# MobileBERT for Phishing Email Detection
|
| 11 |
+
|
| 12 |
+
This model is a fine-tuned MobileBERT for binary phishing-vs-legitimate email classification.
|
| 13 |
+
|
| 14 |
+
## Usage
|
| 15 |
+
|
| 16 |
+
Python (transformers):
|
| 17 |
+
|
| 18 |
+
```python
|
| 19 |
+
from transformers import AutoTokenizer, AutoModelForSequenceClassification
|
| 20 |
+
import torch
|
| 21 |
+
|
| 22 |
+
tok = AutoTokenizer.from_pretrained("Perth0603/phishing-email-mobilebert")
|
| 23 |
+
mdl = AutoModelForSequenceClassification.from_pretrained("Perth0603/phishing-email-mobilebert")
|
| 24 |
+
inputs = tok(["Win an iPhone! Click here"], return_tensors="pt")
|
| 25 |
+
with torch.no_grad():
|
| 26 |
+
pred = mdl(**inputs).logits.softmax(-1)
|
| 27 |
+
print(pred)
|
| 28 |
+
```
|
| 29 |
+
|
| 30 |
+
HF Inference API (public models only):
|
| 31 |
+
|
| 32 |
+
```bash
|
| 33 |
+
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"}'
|
| 34 |
+
```
|