legacy107/spamming-email-classification
Viewer โข Updated โข 5.7k โข 18
How to use h-e-l-l-o/email-spam-classification-merged with Transformers:
# Use a pipeline as a high-level helper
from transformers import pipeline
pipe = pipeline("text-classification", model="h-e-l-l-o/email-spam-classification-merged") # Load model directly
from transformers import AutoTokenizer, AutoModelForSequenceClassification
tokenizer = AutoTokenizer.from_pretrained("h-e-l-l-o/email-spam-classification-merged")
model = AutoModelForSequenceClassification.from_pretrained("h-e-l-l-o/email-spam-classification-merged", device_map="auto")