ggbetz commited on
Commit
6dfbea3
1 Parent(s): 5fb9b56

Update app.

Browse files
Files changed (1) hide show
  1. app.py +3 -4
app.py CHANGED
@@ -256,10 +256,9 @@ def run_model(mode_set, user_input):
256
  with st.spinner('Generating output %d of %d with mode %s'%(i,len(mode_set),mode_id)):
257
  # construct prompt
258
  inquire_prompt = ""
259
- for from_key in current_mode['from']:
260
- inquire_prompt = inquire_prompt + ("%s: %s " % (from_key,current_input[from_key]))
261
  to_key = current_mode['to']
262
- #inquire_prompt = inquire_prompt + to_key + ":" # comment out this line if custom prefix used
 
263
  # inquire model
264
  inputs = inquire_prompt
265
  out = inference(inputs, INFERENCE_PARAMS)
@@ -427,7 +426,7 @@ def main():
427
 
428
 
429
  # Show output
430
- col_source, col_reco = st.beta_columns(2)
431
  with col_source:
432
  st.markdown(f'<div style="font-size: small">Reasons and conclusions in source text</div>',unsafe_allow_html=True)
433
  st.write(HTML_WRAPPER.format(displacy_html), unsafe_allow_html=True)
 
256
  with st.spinner('Generating output %d of %d with mode %s'%(i,len(mode_set),mode_id)):
257
  # construct prompt
258
  inquire_prompt = ""
 
 
259
  to_key = current_mode['to']
260
+ for from_key in current_mode['from']:
261
+ inquire_prompt = inquire_prompt + (f"{to_key}: {from_key}: {current_input[from_key]}")
262
  # inquire model
263
  inputs = inquire_prompt
264
  out = inference(inputs, INFERENCE_PARAMS)
 
426
 
427
 
428
  # Show output
429
+ col_source, col_reco = st.columns(2)
430
  with col_source:
431
  st.markdown(f'<div style="font-size: small">Reasons and conclusions in source text</div>',unsafe_allow_html=True)
432
  st.write(HTML_WRAPPER.format(displacy_html), unsafe_allow_html=True)