ggbetz commited on
Commit
5fb9b56
1 Parent(s): 73c1565

Update app.

Browse files
Files changed (1) hide show
  1. app.py +5 -6
app.py CHANGED
@@ -75,7 +75,6 @@ def params(config):
75
  pass
76
 
77
 
78
- @st.cache(allow_output_mutation=True)
79
  def build_inference_api():
80
  inference = InferenceApi(
81
  repo_id="debatelab/argument-analyst",
@@ -332,7 +331,7 @@ def main():
332
 
333
  # optional additional input
334
 
335
- input_expander = st.beta_expander(label='Additional input (optional)')
336
  with input_expander:
337
  # for every mode, add input field
338
  for d in [m for m in aaac_fields() if m!="argument_source"]:
@@ -434,23 +433,23 @@ def main():
434
  st.write(HTML_WRAPPER.format(displacy_html), unsafe_allow_html=True)
435
 
436
  with col_reco:
437
- ig_expander = st.beta_expander(label='Argument reconstruction (inference graph)', expanded=argdown_valid)
438
  with ig_expander:
439
  if argdown_valid:
440
  st.graphviz_chart(graphviz_graph,use_container_width=True)
441
  else:
442
  st.write("No inference graph to display.")
443
- lgc_expander = st.beta_expander(label='Formalization', expanded=(pform_valid and cform_valid))
444
  with lgc_expander:
445
  if pform_valid and cform_valid:
446
  st.markdown(get_formalization_display(pform_parsed=pform_parsed, cform_parsed=cform_parsed))
447
  else:
448
  st.write("No formalization to display.")
449
- ad_expander = st.beta_expander(label='Argument reconstruction (argdown snippet)', expanded=(not argdown_valid))
450
  with ad_expander:
451
  st.write(format_argdown(argdown_raw,colors), unsafe_allow_html=True)
452
 
453
- history_expander = st.beta_expander(label='Full history', expanded=False)
454
  with history_expander:
455
  st.write(output)
456
 
 
75
  pass
76
 
77
 
 
78
  def build_inference_api():
79
  inference = InferenceApi(
80
  repo_id="debatelab/argument-analyst",
 
331
 
332
  # optional additional input
333
 
334
+ input_expander = st.expander(label='Additional input (optional)')
335
  with input_expander:
336
  # for every mode, add input field
337
  for d in [m for m in aaac_fields() if m!="argument_source"]:
 
433
  st.write(HTML_WRAPPER.format(displacy_html), unsafe_allow_html=True)
434
 
435
  with col_reco:
436
+ ig_expander = st.expander(label='Argument reconstruction (inference graph)', expanded=argdown_valid)
437
  with ig_expander:
438
  if argdown_valid:
439
  st.graphviz_chart(graphviz_graph,use_container_width=True)
440
  else:
441
  st.write("No inference graph to display.")
442
+ lgc_expander = st.expander(label='Formalization', expanded=(pform_valid and cform_valid))
443
  with lgc_expander:
444
  if pform_valid and cform_valid:
445
  st.markdown(get_formalization_display(pform_parsed=pform_parsed, cform_parsed=cform_parsed))
446
  else:
447
  st.write("No formalization to display.")
448
+ ad_expander = st.expander(label='Argument reconstruction (argdown snippet)', expanded=(not argdown_valid))
449
  with ad_expander:
450
  st.write(format_argdown(argdown_raw,colors), unsafe_allow_html=True)
451
 
452
+ history_expander = st.expander(label='Full history', expanded=False)
453
  with history_expander:
454
  st.write(output)
455