Add model card
Browse files
README.md
ADDED
|
@@ -0,0 +1,50 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
language: en
|
| 3 |
+
tags:
|
| 4 |
+
- text-classification
|
| 5 |
+
- phishing-detection
|
| 6 |
+
- email-security
|
| 7 |
+
- onnx
|
| 8 |
+
library_name: transformers.js
|
| 9 |
+
pipeline_tag: text-classification
|
| 10 |
+
---
|
| 11 |
+
|
| 12 |
+
# Phishing Email Detection (ONNX)
|
| 13 |
+
|
| 14 |
+
ONNX-converted version of [dima806/phishing-email-detection](https://huggingface.co/dima806/phishing-email-detection) for use with [Transformers.js](https://huggingface.co/docs/transformers.js).
|
| 15 |
+
|
| 16 |
+
## Model Description
|
| 17 |
+
|
| 18 |
+
DistilBERT model fine-tuned for detecting phishing emails.
|
| 19 |
+
|
| 20 |
+
- **Format:** ONNX (converted from PyTorch)
|
| 21 |
+
- **Task:** Binary classification (PHISHING vs LEGITIMATE)
|
| 22 |
+
- **Accuracy:** ~97%+
|
| 23 |
+
|
| 24 |
+
## Usage with Transformers.js
|
| 25 |
+
|
| 26 |
+
```javascript
|
| 27 |
+
import { pipeline } from '@xenova/transformers';
|
| 28 |
+
|
| 29 |
+
const classifier = await pipeline(
|
| 30 |
+
'text-classification',
|
| 31 |
+
'securecommerce/phishing-email-detection-onnx',
|
| 32 |
+
{ quantized: true }
|
| 33 |
+
);
|
| 34 |
+
|
| 35 |
+
const result = await classifier(
|
| 36 |
+
'Urgent! Verify your account: http://suspicious-link.com'
|
| 37 |
+
);
|
| 38 |
+
|
| 39 |
+
console.log(result);
|
| 40 |
+
// [{ label: 'PHISHING', score: 0.98 }]
|
| 41 |
+
```
|
| 42 |
+
|
| 43 |
+
## Labels
|
| 44 |
+
|
| 45 |
+
- `LEGITIMATE`: Safe email
|
| 46 |
+
- `PHISHING`: Phishing attempt
|
| 47 |
+
|
| 48 |
+
## Credits
|
| 49 |
+
|
| 50 |
+
Original model by [dima806](https://huggingface.co/dima806)
|