Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -37,11 +37,13 @@ st.markdown("Please provide both summary and title when possible")
|
|
37 |
|
38 |
tokenizer, model = load_tok_and_model()
|
39 |
|
40 |
-
title = st.text_area(label='Title', height=
|
41 |
-
abstract = st.text_area(label='Abstract', height=
|
42 |
button = st.button('Run classifier')
|
43 |
|
44 |
if button:
|
45 |
probs = forward_pass(title, abstract, tokenizer, model)
|
46 |
micro_df = pd.DataFrame({'Categories': CATEGORIES, 'Cat. Probability': probs})
|
|
|
|
|
47 |
st.write(micro_df)
|
|
|
37 |
|
38 |
tokenizer, model = load_tok_and_model()
|
39 |
|
40 |
+
title = st.text_area(label='Title', height=50)
|
41 |
+
abstract = st.text_area(label='Abstract', height=250)
|
42 |
button = st.button('Run classifier')
|
43 |
|
44 |
if button:
|
45 |
probs = forward_pass(title, abstract, tokenizer, model)
|
46 |
micro_df = pd.DataFrame({'Categories': CATEGORIES, 'Cat. Probability': probs})
|
47 |
+
micro_df = micro_df.sort_values(by='Cat. Probability', ascending=False)
|
48 |
+
micro_df.style.hide_index()
|
49 |
st.write(micro_df)
|