|
|
--- |
|
|
language: en |
|
|
tags: |
|
|
- text-classification |
|
|
- phishing-detection |
|
|
- email-security |
|
|
- onnx |
|
|
library_name: transformers.js |
|
|
pipeline_tag: text-classification |
|
|
--- |
|
|
|
|
|
# Phishing Email Detection (ONNX) |
|
|
|
|
|
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). |
|
|
|
|
|
## Model Description |
|
|
|
|
|
DistilBERT model fine-tuned for detecting phishing emails. |
|
|
|
|
|
- **Format:** ONNX (converted from PyTorch) |
|
|
- **Task:** Binary classification (PHISHING vs LEGITIMATE) |
|
|
- **Accuracy:** ~97%+ |
|
|
|
|
|
## Usage with Transformers.js |
|
|
|
|
|
```javascript |
|
|
import { pipeline } from '@xenova/transformers'; |
|
|
|
|
|
const classifier = await pipeline( |
|
|
'text-classification', |
|
|
'securecommerce/phishing-email-detection-onnx', |
|
|
{ quantized: true } |
|
|
); |
|
|
|
|
|
const result = await classifier( |
|
|
'Urgent! Verify your account: http://suspicious-link.com' |
|
|
); |
|
|
|
|
|
console.log(result); |
|
|
// [{ label: 'PHISHING', score: 0.98 }] |
|
|
``` |
|
|
|
|
|
## Labels |
|
|
|
|
|
- `LEGITIMATE`: Safe email |
|
|
- `PHISHING`: Phishing attempt |
|
|
|
|
|
## Credits |
|
|
|
|
|
Original model by [dima806](https://huggingface.co/dima806) |
|
|
|