bhadresh-savani commited on
Commit
768bd83
1 Parent(s): 7de6dd6

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +14 -2
README.md CHANGED
@@ -25,9 +25,21 @@ metrics:
25
  ## How to Use the model:
26
  ```python
27
  from transformers import pipeline
28
- classifier = pipeline("sentiment-analysis",model='bhadresh-savani/distilbert-base-uncased-emotion')
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
  ## Dataset:
 
25
  ## How to Use the model:
26
  ```python
27
  from transformers import pipeline
28
+ classifier = pipeline("text-classification",model='bhadresh-savani/distilbert-base-uncased-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.0006792712374590337},
36
+ {'label': 'joy', 'score': 0.9959300756454468},
37
+ {'label': 'love', 'score': 0.0009452480007894337},
38
+ {'label': 'anger', 'score': 0.0018055217806249857},
39
+ {'label': 'fear', 'score': 0.00041110432357527316},
40
+ {'label': 'surprise', 'score': 0.0002288572577526793}
41
+ ]]
42
+ """
43
  ```
44
 
45
  ## Dataset: