Update README.md
This commit is contained in:
parent
8bc605c908
commit
856553beaa
|
@ -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
|
||||
|
||||
|
|
Loading…
Reference in New Issue