douglasgoodwin commited on
Commit
0b97ed9
·
verified ·
1 Parent(s): 17b9a8a

show the lower scores

Browse files
Files changed (1) hide show
  1. app.py +5 -1
app.py CHANGED
@@ -16,7 +16,11 @@ def classify_emotion(text):
16
 
17
  # Update the dictionary with the scores returned by the model
18
  for item in predictions:
19
- emotion_scores[item["label"]] = item["score"]
 
 
 
 
20
 
21
  return emotion_scores
22
 
 
16
 
17
  # Update the dictionary with the scores returned by the model
18
  for item in predictions:
19
+ iscore = int(item["score"])
20
+ if iscore < 1.0:
21
+ iscore = iscore*10
22
+
23
+ emotion_scores[item["label"]] = iscore
24
 
25
  return emotion_scores
26