Update app.py
Browse files
app.py
CHANGED
@@ -187,17 +187,18 @@ with gr.Blocks() as demo:
|
|
187 |
for inp in inputs:
|
188 |
inp.render()
|
189 |
# Submit and Clear Buttons under the inputs
|
190 |
-
gr.
|
191 |
-
|
192 |
-
|
193 |
-
|
194 |
-
|
195 |
-
|
|
|
196 |
|
197 |
with gr.Column(scale=1):
|
198 |
gr.Image(image_path)
|
199 |
|
200 |
-
#
|
201 |
with gr.Row():
|
202 |
with gr.Column(scale=2):
|
203 |
gr.Markdown("### Contamination Predictions")
|
@@ -214,7 +215,7 @@ with gr.Blocks() as demo:
|
|
214 |
for out in cleaning_time_outputs:
|
215 |
out.render()
|
216 |
|
217 |
-
# Graph
|
218 |
with gr.Row():
|
219 |
with gr.Column():
|
220 |
gr.Markdown("### Contamination Levels Over Time")
|
|
|
187 |
for inp in inputs:
|
188 |
inp.render()
|
189 |
# Submit and Clear Buttons under the inputs
|
190 |
+
with gr.Row():
|
191 |
+
gr.Button(value="Submit", variant="primary").click(
|
192 |
+
fn=predict_and_plot,
|
193 |
+
inputs=inputs,
|
194 |
+
outputs=[gr.Plot(label="Contamination Levels Over Time")] + contamination_outputs + gradients_outputs + cleaning_time_outputs
|
195 |
+
)
|
196 |
+
gr.Button(value="Clear").click(fn=lambda: None)
|
197 |
|
198 |
with gr.Column(scale=1):
|
199 |
gr.Image(image_path)
|
200 |
|
201 |
+
# Middle Section: Outputs (Three columns)
|
202 |
with gr.Row():
|
203 |
with gr.Column(scale=2):
|
204 |
gr.Markdown("### Contamination Predictions")
|
|
|
215 |
for out in cleaning_time_outputs:
|
216 |
out.render()
|
217 |
|
218 |
+
# Bottom Section: Graph at the very end
|
219 |
with gr.Row():
|
220 |
with gr.Column():
|
221 |
gr.Markdown("### Contamination Levels Over Time")
|