qc7 commited on
Commit
93da556
1 Parent(s): 20a069a

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -2
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=200)
41
- abstract = st.text_area(label='Abstract', height=200)
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)