Update README.md
Browse files
README.md
CHANGED
@@ -6,7 +6,7 @@ language:
|
|
6 |
- en
|
7 |
pipeline_tag: text-classification
|
8 |
---
|
9 |
-
# cardiffnlp/twitter-roberta-base-latest
|
10 |
|
11 |
This is a RoBERTa-base model trained on 154M tweets until the end of December 2022 and finetuned for emotion classification (multilabel classification) on the _TweetEmotion_ dataset of [SuperTweetEval](https://huggingface.co/datasets/cardiffnlp/super_tweeteval).
|
12 |
The original Twitter-based RoBERTa model can be found [here](https://huggingface.co/cardiffnlp/twitter-roberta-base-2022-154m).
|
@@ -33,7 +33,7 @@ The original Twitter-based RoBERTa model can be found [here](https://huggingface
|
|
33 |
from transformers import pipeline
|
34 |
text= "@user it also helps that the majority of NFL coaching is inept. Some of Bill O'Brien's play calling was wow, ! #GOPATS"
|
35 |
|
36 |
-
pipe = pipeline('text-classification', model="cardiffnlp/twitter-roberta-base-latest
|
37 |
predictions = pipe(text)[0]
|
38 |
predictions = [x for x in predictions if x['score'] > 0.5]
|
39 |
predictions
|
|
|
6 |
- en
|
7 |
pipeline_tag: text-classification
|
8 |
---
|
9 |
+
# cardiffnlp/twitter-roberta-base-emotion-latest
|
10 |
|
11 |
This is a RoBERTa-base model trained on 154M tweets until the end of December 2022 and finetuned for emotion classification (multilabel classification) on the _TweetEmotion_ dataset of [SuperTweetEval](https://huggingface.co/datasets/cardiffnlp/super_tweeteval).
|
12 |
The original Twitter-based RoBERTa model can be found [here](https://huggingface.co/cardiffnlp/twitter-roberta-base-2022-154m).
|
|
|
33 |
from transformers import pipeline
|
34 |
text= "@user it also helps that the majority of NFL coaching is inept. Some of Bill O'Brien's play calling was wow, ! #GOPATS"
|
35 |
|
36 |
+
pipe = pipeline('text-classification', model="cardiffnlp/twitter-roberta-base-emotion-latest", return_all_scores=True)
|
37 |
predictions = pipe(text)[0]
|
38 |
predictions = [x for x in predictions if x['score'] > 0.5]
|
39 |
predictions
|