antypasd commited on
Commit
4c06e56
·
verified ·
1 Parent(s): 05bf00d

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +7 -2
README.md CHANGED
@@ -5,6 +5,12 @@ license: mit
5
  datasets:
6
  - cardiffnlp/super_tweeteval
7
  pipeline_tag: text-classification
 
 
 
 
 
 
8
  ---
9
  # cardiffnlp/twitter-roberta-base-emoji-latest
10
 
@@ -16,8 +22,7 @@ The original Twitter-based RoBERTa model can be found [here](https://huggingface
16
  from transformers import pipeline
17
  text= "I’m tired of being sick.. it’s been four days dawg"
18
 
19
- pipe = pipeline('text-classification', model="cardiffnlp/twitter-roberta-base-emoji-latest")
20
- pipe(text)
21
  predictions = pipe(text)[0]
22
  predictions = sorted(predictions, key=lambda d: d['score'], reverse=True)
23
  predictions[:5]
 
5
  datasets:
6
  - cardiffnlp/super_tweeteval
7
  pipeline_tag: text-classification
8
+ inference:
9
+ parameters:
10
+ return_all_scores: True
11
+ widget:
12
+ - text: >-
13
+ I’m tired of being sick.. it’s been four days dawg
14
  ---
15
  # cardiffnlp/twitter-roberta-base-emoji-latest
16
 
 
22
  from transformers import pipeline
23
  text= "I’m tired of being sick.. it’s been four days dawg"
24
 
25
+ pipe = pipeline('text-classification', model="cardiffnlp/twitter-roberta-base-emoji-latest", return_all_scores=True))
 
26
  predictions = pipe(text)[0]
27
  predictions = sorted(predictions, key=lambda d: d['score'], reverse=True)
28
  predictions[:5]