Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -130,11 +130,11 @@ if st.button("Посмотреть топ"):
|
|
| 130 |
ans = model(ids.unsqueeze(0), mask.unsqueeze(0), token_type_ids.unsqueeze(0))
|
| 131 |
elems = [el.item() for el in ans[0].argsort(descending=True)[:10]]
|
| 132 |
probs = ans[0].softmax(dim=0)
|
| 133 |
-
|
| 134 |
for el in elems:
|
| 135 |
-
|
| 136 |
|
| 137 |
-
st.markdown(
|
| 138 |
|
| 139 |
|
| 140 |
|
|
|
|
| 130 |
ans = model(ids.unsqueeze(0), mask.unsqueeze(0), token_type_ids.unsqueeze(0))
|
| 131 |
elems = [el.item() for el in ans[0].argsort(descending=True)[:10]]
|
| 132 |
probs = ans[0].softmax(dim=0)
|
| 133 |
+
str_ans = ''
|
| 134 |
for el in elems:
|
| 135 |
+
str_ans += str(el) + " : " + str(probs[el]) + "\n"
|
| 136 |
|
| 137 |
+
st.markdown(str_ans)
|
| 138 |
|
| 139 |
|
| 140 |
|