Spaces:
Runtime error
Runtime error
File size: 383 Bytes
e695e6e 5d6dc63 e695e6e 5d6dc63 e695e6e 5d6dc63 e695e6e |
1 2 3 4 5 6 7 8 9 10 11 12 |
from transformers import AutoTokenizer, AutoModelForSequenceClassification
from transformers import pipeline
tokenizer = AutoTokenizer.from_pretrained("Alanhau/test")
model = AutoModelForSequenceClassification.from_pretrained("Alanhau/test")
nlp = pipeline("sentiment-analysis", model=model, tokenizer=tokenizer)
sentences = ["hate you!"]
results = nlp(sentences)
print(results) |