Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -36,7 +36,7 @@ def get_predict(title: str, abstract: str) -> (str, float, dict):
|
|
36 |
out = model(**tokens_info)
|
37 |
probs = torch.nn.functional.softmax(out.logits, dim=-1).tolist()[0]
|
38 |
|
39 |
-
return list(sorted([(p, ind_to_target[i]) for i, p in enumerate(probs)]
|
40 |
|
41 |
|
42 |
title = st.text_area("Title ", "", height=100)
|
|
|
36 |
out = model(**tokens_info)
|
37 |
probs = torch.nn.functional.softmax(out.logits, dim=-1).tolist()[0]
|
38 |
|
39 |
+
return list(sorted([(p, ind_to_target[i]) for i, p in enumerate(probs)]))[::-1]
|
40 |
|
41 |
|
42 |
title = st.text_area("Title ", "", height=100)
|