Elron Bandel commited on
Commit
400e02d
1 Parent(s): 2df020e

Add predictions title to spinner

Browse files
Files changed (1) hide show
  1. app.py +4 -4
app.py CHANGED
@@ -126,10 +126,10 @@ if mode == 'Models':
126
  st.markdown('#### Outputs:')
127
  with st.spinner('Running model...'):
128
  res = unmasker(input_masked, tokenized=masking_level == 'SubWords', top_k=n_res)
129
- if res:
130
- res = [{'Prediction':r['token_str'], 'Completed Sentence':r['sequence'].replace('[SEP]', '').replace('[CLS]', ''), 'Score':r['score']} for r in res]
131
- res_table = pd.DataFrame(res)
132
- st.table(res_table)
133
 
134
 
135
 
 
126
  st.markdown('#### Outputs:')
127
  with st.spinner('Running model...'):
128
  res = unmasker(input_masked, tokenized=masking_level == 'SubWords', top_k=n_res)
129
+ if res:
130
+ res = [{'Prediction':r['token_str'], 'Completed Sentence':r['sequence'].replace('[SEP]', '').replace('[CLS]', ''), 'Score':r['score']} for r in res]
131
+ res_table = pd.DataFrame(res)
132
+ st.table(res_table)
133
 
134
 
135