Update README.md

This commit is contained in:
Cardiff NLP 2021-04-17 06:29:06 +00:00 committed by huggingface-web
parent 8bc605c908
commit 856553beaa
1 changed files with 4 additions and 1 deletions

View File

@ -22,9 +22,12 @@ This is a XLM-roBERTa-base model trained on ~198M tweets and finetuned for senti
from transformers import pipeline
model_path = "cardiffnlp/twitter-xlm-roberta-base-sentiment"
sentiment_task = pipeline("sentiment-analysis", model=model_path, tokenizer=model_path)
sentiment_task("T'estimo!")
```
Output:
```
[{'label': 'LABEL_2', 'score': 0.6600581407546997}]
```
## Full classification example