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.
Instructions to use yanyoeurn/sms-spam-detector with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Scikit-learn
How to use yanyoeurn/sms-spam-detector with Scikit-learn:
from huggingface_hub import hf_hub_download import joblib model = joblib.load( hf_hub_download("yanyoeurn/sms-spam-detector", "sklearn_model.joblib") ) # only load pickle files from sources you trust # read more about it here https://skops.readthedocs.io/en/stable/persistence.html - Notebooks
- Google Colab
- Kaggle
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.pklsms_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
- -