SpamHunter Model

This is a fine-tuned BERT model for spam detection.

Model Details

  • Base Model: bert-base-uncased
  • Dataset: Custom spam emails dataset
  • Training Steps: 3 epochs
  • Validation Accuracy: ~99%

How to Use

Direct Integration with Transformers

from transformers import BertTokenizer, BertForSequenceClassification

# Load model and tokenizer
tokenizer = BertTokenizer.from_pretrained("ar4min/SpamHunter")
model = BertForSequenceClassification.from_pretrained("ar4min/SpamHunter")

# Example
text = "Congratulations! You've won a $1000 gift card. Click here to claim now."
inputs = tokenizer(text, return_tensors="pt")
outputs = model(**inputs)
prediction = outputs.logits.argmax(-1).item()

print("Spam" if prediction == 1 else "Not Spam")
Downloads last month
28
Safetensors
Model size
109M params
Tensor type
F32
·
Inference Examples
This model does not have enough activity to be deployed to Inference API (serverless) yet. Increase its social visibility and check back later, or deploy to Inference Endpoints (dedicated) instead.