mshenoda/spam-messages
Viewer • Updated • 59.2k • 188 • 3
How to use ki4n-4nt/spam_text_classifier with Transformers:
# Use a pipeline as a high-level helper
from transformers import pipeline
pipe = pipeline("text-classification", model="ki4n-4nt/spam_text_classifier") # Load model directly
from transformers import AutoTokenizer, AutoModelForSequenceClassification
tokenizer = AutoTokenizer.from_pretrained("ki4n-4nt/spam_text_classifier")
model = AutoModelForSequenceClassification.from_pretrained("ki4n-4nt/spam_text_classifier", device_map="auto")