istassiy commited on
Commit
2b0ca1b
·
1 Parent(s): 7d6731a

commit from

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -58,7 +58,7 @@ def get_top_predictions(predictions):
58
 
59
  res = {}
60
  total_prob = 0
61
- for topic, prob in zip(sorted_arxiv_topics, probs):
62
  total_prob += prob
63
  res[topic] = prob
64
  if total_prob > 0.95:
@@ -70,7 +70,7 @@ model = load_model()
70
 
71
  st.markdown("# Scientific paper classificator")
72
  st.markdown(
73
- "Fill in paper summary and / or title below:",
74
  unsafe_allow_html=False
75
  )
76
 
 
58
 
59
  res = {}
60
  total_prob = 0
61
+ for topic, prob in sorted(zip(sorted_arxiv_topics, probs), key=lambda item: item[1], reverse=True):
62
  total_prob += prob
63
  res[topic] = prob
64
  if total_prob > 0.95:
 
70
 
71
  st.markdown("# Scientific paper classificator")
72
  st.markdown(
73
+ "Fill in paper summary and / or title below and then press open area on the page to submit inputs:",
74
  unsafe_allow_html=False
75
  )
76