Nihilitybot666/naijascam
Viewer • Updated • 1.86k • 13
How to use Nihilitybot666/shora-tfidf with Scikit-learn:
from huggingface_hub import hf_hub_download
import joblib
model = joblib.load(
hf_hub_download("Nihilitybot666/shora-tfidf", "sklearn_model.joblib")
)
# only load pickle files from sources you trust
# read more about it here https://skops.readthedocs.io/en/stable/persistence.htmlTiny (~4 MB) scikit-learn baseline from Shora.
binary.joblib: scam vs legit (word 1–2-gram + char_wb 2–5-gram TF-IDF → logistic regression, C=4, balanced)scam_type.joblib: same features → 17-way type (9 scam + 8 legit types)| split | accuracy | macro-F1 |
|---|---|---|
| NaijaScam test (365, synthetic, in-distribution) | 97.8 | 97.8 |
| NaijaScam challenge (40, hand-written, OOD) | 75.0 | 73.3 |
Scam-type accuracy on test: 89.3. Speed: ~0.5 ms per message on CPU.
Caveat: it misses about half of the short, conversational, hand-written scams (challenge scam recall 50%), so use it as a fast first pass alongside an LLM or human judgement, not as the only safeguard.
import joblib
clf = joblib.load("binary.joblib")
clf.predict_proba(["Your BVN has been suspended. Send the OTP to reactivate."]) # classes_: ['legit', 'scam']