bhadresh-savani commited on
Commit
fd6ebe3
1 Parent(s): 4c4becf

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +15 -2
README.md CHANGED
@@ -25,8 +25,21 @@ metrics:
25
  ## How to Use the model:
26
  ```python
27
  from transformers import pipeline
28
- classifier = pipeline("sentiment-analysis",model='bhadresh-savani/robert-base-emotion')
29
- prediction = classifier("I love using transformers. The best part is wide range of support and its easy to use")
 
 
 
 
 
 
 
 
 
 
 
 
 
30
  ```
31
 
32
  ## Dataset:
 
25
  ## How to Use the model:
26
  ```python
27
  from transformers import pipeline
28
+ classifier = pipeline("text-classification",model='bhadresh-savani/roberta-base-emotion', return_all_scores=True)
29
+ prediction = classifier("I love using transformers. The best part is wide range of support and its easy to use", )
30
+ print(prediction)
31
+
32
+ """
33
+ Output:
34
+ [[
35
+ {'label': 'sadness', 'score': 0.002281982684507966},
36
+ {'label': 'joy', 'score': 0.9726489186286926},
37
+ {'label': 'love', 'score': 0.021365027874708176},
38
+ {'label': 'anger', 'score': 0.0026395076420158148},
39
+ {'label': 'fear', 'score': 0.0007162453257478774},
40
+ {'label': 'surprise', 'score': 0.0003483477921690792}
41
+ ]]
42
+ """
43
  ```
44
 
45
  ## Dataset: