CoolFace
Modelpublic

logakarthikeyan/spam-classifcation-model-bert

sourceHugging Facemitupdated 7mo agoView on Hugging Face
0likes17downloads
Model Card

BERT for SMS Spam Detection

This model is a fine-tuned version of bert-base-uncased on the ucirvine/sms_spam dataset. It achieves high precision and recall for identifying promotional or fraudulent messages.

Training Results

During training, the model showed rapid convergence, reaching over 99% accuracy by the third epoch.

EpochTraining LossFiltered Train AccValidation LossValidation Acc
10.09140.97110.04000.9901
20.02150.99510.05300.9892
30.00580.99870.05130.9910

Final Evaluation

The final model performance on the test set:

Classification Report

ClassPrecisionRecallF1-ScoreSupport
Ham (Not Spam)0.991.000.99966
Spam0.980.950.97149
Accuracy0.99101115

Usage

python
from transformers import pipeline

classifier = pipeline("text-classification", model="your-username/your-model-name")
result = classifier("Congratulations! You've won a $1,000 Walmart gift card. Click here to claim.")
print(result)