Spaces:
Runtime error
Runtime error
commit from
Browse files
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 |
|