codesignal/sms-spam-collection
Viewer β’ Updated β’ 5.57k β’ 686 β’ 1
How to use Sathya77/spam-ham-classifier with Transformers:
# Use a pipeline as a high-level helper
from transformers import pipeline
pipe = pipeline("text-classification", model="Sathya77/spam-ham-classifier") # Load model directly
from transformers import AutoTokenizer, AutoModelForSequenceClassification
tokenizer = AutoTokenizer.from_pretrained("Sathya77/spam-ham-classifier")
model = AutoModelForSequenceClassification.from_pretrained("Sathya77/spam-ham-classifier")This is my first fine-tuned model on Hugging Face π.
It is a spam vs ham (not spam) classifier built using a BERT model fine-tuned on SMS spam data.
The goal is to help detect unwanted spam messages while keeping normal communications intact.
I created and uploaded this model as part of my learning journey into NLP and Transformers.
The model was trained on a spam/ham dataset with high accuracy and strong F1 performance.
It can be used for SMS filtering, email pre-screening, or any application requiring spam detection.
0 = ham, 1 = spam| Metric | Score |
|---|---|
| Accuracy | 99.3% |
| F1 Score | 97.5% |
| Precision | 100% |
| Recall | 95.1% |
from transformers import pipeline
classifier = pipeline("text-classification", model="Sathya77/spam-ham-classifier")
classifier("Congratulations! You won a free gift card!")
# β [{'label': 'spam', 'score': 0.99}]
Base model
google-bert/bert-base-cased