C2MV commited on
Commit
2e99c86
1 Parent(s): 6660e8c

Update UI.py

Browse files
Files changed (1) hide show
  1. UI.py +11 -3
UI.py CHANGED
@@ -76,9 +76,9 @@ def create_interface(process_and_plot):
76
  output_gallery = gr.Gallery(label="Results", columns=2, height='auto')
77
  analysis_output = gr.Textbox(label="Yi-Coder Analysis", lines=15)
78
 
79
- biomass_eq_count = gr.State(1)
80
- substrate_eq_count = gr.State(1)
81
- product_eq_count = gr.State(1)
82
 
83
  def add_equation(equations_list, eq_count):
84
  eq_count = min(eq_count + 1, MAX_EQUATIONS)
@@ -143,3 +143,11 @@ def create_interface(process_and_plot):
143
  substrate_eq_count,
144
  product_eq_count
145
  ]
 
 
 
 
 
 
 
 
 
76
  output_gallery = gr.Gallery(label="Results", columns=2, height='auto')
77
  analysis_output = gr.Textbox(label="Yi-Coder Analysis", lines=15)
78
 
79
+ biomass_eq_count = gr.Number(value=1, visible=False)
80
+ substrate_eq_count = gr.Number(value=1, visible=False)
81
+ product_eq_count = gr.Number(value=1, visible=False)
82
 
83
  def add_equation(equations_list, eq_count):
84
  eq_count = min(eq_count + 1, MAX_EQUATIONS)
 
143
  substrate_eq_count,
144
  product_eq_count
145
  ]
146
+
147
+ simulate_btn.click(
148
+ fn=process_and_plot,
149
+ inputs=simulate_inputs,
150
+ outputs=[output_gallery, analysis_output]
151
+ )
152
+
153
+ return demo # Make sure to return the demo object here