m3hrdadfi commited on
Commit
889369d
1 Parent(s): bd01cf2

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +2 -2
README.md CHANGED
@@ -70,7 +70,7 @@ def predict(path, sampling_rate):
70
  logits = model(**inputs).logits
71
 
72
  scores = F.softmax(logits, dim=1).detach().cpu().numpy()[0]
73
- outputs = [{"Emotion": config.id2label[i], "Score": f"{round(score * 100, 3):.1f}%"} for i, score in enumerate(scores)]
74
  return outputs
75
  ```
76
 
@@ -86,7 +86,7 @@ outputs = predict(path, sampling_rate)
86
  {'Label': 'Happiness', 'Score': '0.0%'},
87
  {'Label': 'Neutral', 'Score': '0.0%'},
88
  {'Label': 'Sadness', 'Score': '99.9%'},
89
- {'Label': 'Surprise', 'Score': '0.0%'}]
90
  ]
91
  ```
92
 
70
  logits = model(**inputs).logits
71
 
72
  scores = F.softmax(logits, dim=1).detach().cpu().numpy()[0]
73
+ outputs = [{"Label": config.id2label[i], "Score": f"{round(score * 100, 3):.1f}%"} for i, score in enumerate(scores)]
74
  return outputs
75
  ```
76
 
86
  {'Label': 'Happiness', 'Score': '0.0%'},
87
  {'Label': 'Neutral', 'Score': '0.0%'},
88
  {'Label': 'Sadness', 'Score': '99.9%'},
89
+ {'Label': 'Surprise', 'Score': '0.0%'}
90
  ]
91
  ```
92