dfedukov commited on
Commit
f1fb568
·
verified ·
1 Parent(s): 66ca485

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
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)], reversed=True))
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)