Run this model with HF Jobs

Run yanyoeurn/sms-spam-detector on Hugging Face's managed compute, monitor its progress, and retrieve the results when it's done.

Paste one of these prompts into your coding agent:

Fine-tune on my dataset

Use HF Jobs to fine-tune https://huggingface.co/yanyoeurn/sms-spam-detector. Ask me which dataset to train on, then push the fine-tuned model to a new model repo. Run `hf jobs --help` first to learn the CLI.

Run batch inference

Use HF Jobs to run batch inference with https://huggingface.co/yanyoeurn/sms-spam-detector on the inputs in a mounted HF Bucket. Ask me which Bucket to use, then write the outputs back to it and keep each input ID. Run `hf jobs --help` first to learn the CLI.

SMS Spam Detection Model

logistic_regression + TfidfVectorizer (ngram (1, 2), max_features=3000).

Metrics (held-out test set)

Accuracy Precision Recall F1 ROC-AUC
0.9968 0.9982 0.9955 0.9968 1.0000
  • Dataset: Deysi/spam-detection-dataset
  • Train / test samples: 8720 / 2180
  • Features: 3000
  • Trained: 2026-01-20T13:38:58.040754

Files

  • sms_classifier.pkl
  • sms_vectorizer.pkl

⚠️ scikit-learn version

Trained with scikit-learn 1.4.0. Install the same version to avoid InconsistentVersionWarning and possible silent breakage:

pip install scikit-learn==1.4.0 joblib huggingface_hub

Usage

import joblib
from huggingface_hub import hf_hub_download

repo = "yanyoeurn/sms-spam-detector"
clf = joblib.load(hf_hub_download(repo, "sms_classifier.pkl"))
vec = joblib.load(hf_hub_download(repo, "sms_vectorizer.pkl"))

X = vec.transform(["your text here"])
print(clf.predict(X), clf.predict_proba(X))
Downloads last month
-
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support