douglasgoodwin commited on
Commit
294f763
·
verified ·
1 Parent(s): 0b97ed9

use floating point

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -16,9 +16,9 @@ def classify_emotion(text):
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
 
 
16
 
17
  # Update the dictionary with the scores returned by the model
18
  for item in predictions:
19
+ iscore = float(item["score"])
20
  if iscore < 1.0:
21
+ iscore = iscore*10.0
22
 
23
  emotion_scores[item["label"]] = iscore
24