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-68M with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use CobuildX-AI/cbx-phishing-detector-68M with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-classification", model="CobuildX-AI/cbx-phishing-detector-68M")# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForMaskedLM tokenizer = AutoTokenizer.from_pretrained("CobuildX-AI/cbx-phishing-detector-68M") model = AutoModelForMaskedLM.from_pretrained("CobuildX-AI/cbx-phishing-detector-68M", device_map="auto") - Notebooks
- Google Colab
- Kaggle
Download example.py from CobuildX-AI/cbx-phishing-detector-68M: direct link, hf CLI and curl.
- Browser
- Download file 1.24 kB
-
https://huggingface.co/CobuildX-AI/cbx-phishing-detector-68M/resolve/main/example.py
- Command line
-
hf download hf://CobuildX-AI/cbx-phishing-detector-68M/example.py
-
curl -L -o example.py https://huggingface.co/CobuildX-AI/cbx-phishing-detector-68M/resolve/main/example.py
1.24 kB
| # 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())}") | |