Text Classification
Transformers
Safetensors
English
modernbert
fill-mask
phishing
phishing-detection
spam
spam-detection
email
sms
text-embeddings-inference
Instructions to use CobuildX-AI/cbx-phishing-detector-17M with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use CobuildX-AI/cbx-phishing-detector-17M with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-classification", model="CobuildX-AI/cbx-phishing-detector-17M")# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForMaskedLM tokenizer = AutoTokenizer.from_pretrained("CobuildX-AI/cbx-phishing-detector-17M") model = AutoModelForMaskedLM.from_pretrained("CobuildX-AI/cbx-phishing-detector-17M", device_map="auto") - Notebooks
- Google Colab
- Kaggle
File size: 1,244 Bytes
cb92caa | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | # Copyright 2026 Cobuild Tech Private Limited
# SPDX-License-Identifier: Apache-2.0
"""Run from the model folder: python example.py (every text below is invented for this example)"""
from cbx_phishing import PhishingDetector
clf = PhishingDetector(".")
texts = [
"Subject: Your mailbox is almost full\n\nDear user, your mailbox has reached 98% of its quota. Incoming messages will be rejected after 24 hours. Verify your account now to keep receiving mail: http://mail-quota-update.example-portal.com/verify",
"Subject: Re: Thursday planning meeting\n\nHi Priya, thanks for sending the draft. Can we move the meeting to 3 pm? I'll bring the budget numbers. Best, Tom",
"Subject: 40% off all garden furniture this weekend\n\nSpring sale! Save 40% on chairs, tables and parasols until Sunday. Free delivery on orders over $99. Shop now at gardenhouse-deals.example.com. Unsubscribe here.",
"Your parcel could not be delivered. Pay the $1.99 redelivery fee within 12 hours: https://parcel-redeliver.example.top/pay",
"Hey, are we still on for dinner tonight? I can pick you up at 7.",
]
for text, r in zip(texts, clf.classify(texts)):
print(f"{r['label']:<9} {max(r['scores'].values()):.2f} {' '.join(text.split())}")
|