use floating point
Browse files
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 =
|
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 |
|