bhadresh-savani commited on
Commit
fd52bbd
1 Parent(s): 0e4cf73

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/bert-base-uncased-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/bert-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.0005138228880241513},
36
+ {'label': 'joy', 'score': 0.9972520470619202},
37
+ {'label': 'love', 'score': 0.0007443308713845909},
38
+ {'label': 'anger', 'score': 0.0007404946954920888},
39
+ {'label': 'fear', 'score': 0.00032938539516180754},
40
+ {'label': 'surprise', 'score': 0.0004197491507511586}
41
+ ]]
42
+ """
43
  ```
44
 
45
  ## Dataset: