show the lower scores
Browse files
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 |
-
|
|
|
|
|
|
|
|
|
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 |
|