Spaces:
Running
Running
kovacsvi
commited on
Commit
·
a55b33f
1
Parent(s):
3a6eb20
manifesto fix
Browse files- interfaces/manifesto.py +1 -1
interfaces/manifesto.py
CHANGED
@@ -53,7 +53,7 @@ def predict(text, model_id, tokenizer_id):
|
|
53 |
release_model(model, model_id)
|
54 |
|
55 |
probs = torch.nn.functional.softmax(logits, dim=1).cpu().numpy().flatten()
|
56 |
-
output_pred = {f"[{
|
57 |
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>'
|
58 |
return output_pred, output_info
|
59 |
|
|
|
53 |
release_model(model, model_id)
|
54 |
|
55 |
probs = torch.nn.functional.softmax(logits, dim=1).cpu().numpy().flatten()
|
56 |
+
output_pred = {f"[{MANIFESTO_NUM_DICT[i]}] {MANIFESTO_LABEL_NAMES[int(MANIFESTO_NUM_DICT[i])]}": probs[i] for i in np.argsort(probs)[::-1]}
|
57 |
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>'
|
58 |
return output_pred, output_info
|
59 |
|