Spaces:
Running
Running
kovacsvi
commited on
Commit
·
ad7818c
1
Parent(s):
6ffe6d6
sketchy variable
Browse files- interfaces/emotion9.py +1 -2
interfaces/emotion9.py
CHANGED
@@ -62,8 +62,7 @@ def predict(text, model_id, tokenizer_id):
|
|
62 |
else:
|
63 |
label_names = EMOTION9_LABEL_NAMES
|
64 |
|
65 |
-
|
66 |
-
output_pred = {f"[{NUMS_DICT[i]}] {label_names[NUMS_DICT[i]]}": probs[i] for i in np.argsort(probs)[::-1]}
|
67 |
output_info = f'<p style="text-align: center; display: block">Prediction was made using the <a href="https://huggingface.co/{model_id}">{model_id}</a> model.</p>'
|
68 |
return output_pred, output_info
|
69 |
|
|
|
62 |
else:
|
63 |
label_names = EMOTION9_LABEL_NAMES
|
64 |
|
65 |
+
output_pred = {f"[{i}] {label_names[i]}": probs[i] for i in np.argsort(probs)[::-1]}
|
|
|
66 |
output_info = f'<p style="text-align: center; display: block">Prediction was made using the <a href="https://huggingface.co/{model_id}">{model_id}</a> model.</p>'
|
67 |
return output_pred, output_info
|
68 |
|