ucirvine/sms_spam
Viewer • Updated • 5.57k • 8.94k • 56
How to use ereniko/Spamo-v1 with Transformers:
# Use a pipeline as a high-level helper
from transformers import pipeline
pipe = pipeline("text-classification", model="ereniko/Spamo-v1") # Load model directly
from transformers import AutoTokenizer, AutoModelForSequenceClassification
tokenizer = AutoTokenizer.from_pretrained("ereniko/Spamo-v1")
model = AutoModelForSequenceClassification.from_pretrained("ereniko/Spamo-v1", device_map="auto")A fine-tuned version of distilbert-base-uncased for binary spam classification. Spamo-v1 was trained on the UCI SMS Spam Collection dataset to detect spam messages with high precision.
| Metric | Validation | Test |
|---|---|---|
| Accuracy | 99.46% | 98.92% |
| F1 | 98.04% | 95.65% |
| Precision | 100.00% | 98.51% |
| Recall | 96.15% | 92.96% |
from transformers import pipeline
classifier = pipeline("text-classification", model="ereniko/Spamo-v1")
classifier("Congratulations! You've won a free iPhone. Click here to claim now!")
# [{'label': 'SPAM', 'score': 0.999}]
Base model
distilbert/distilbert-base-uncased