From 856553beaaaf559c029023df1e1af05a35723b77 Mon Sep 17 00:00:00 2001 From: Cardiff NLP Date: Sat, 17 Apr 2021 06:29:06 +0000 Subject: [PATCH] Update README.md --- README.md | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 8ee7a9f..d8b051b 100644 --- a/README.md +++ b/README.md @@ -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