redo
Browse files
app.py
CHANGED
@@ -508,6 +508,8 @@ def get_status_default(exp):
|
|
508 |
|
509 |
while experiment is None and (time.time() - start) < timeout:
|
510 |
time.sleep(0.1)
|
|
|
|
|
511 |
|
512 |
# Define the interface components
|
513 |
with gr.Blocks() as demo:
|
@@ -521,16 +523,17 @@ with gr.Blocks() as demo:
|
|
521 |
gr.Markdown("# Status")
|
522 |
get_status = gr.Button("Get Status")
|
523 |
|
524 |
-
gr.Textbox(label="Experiment",
|
525 |
-
gr.Textbox(label="Running",
|
526 |
-
gr.Textbox(label="Temperature Automation",
|
527 |
-
gr.Textbox(label="RPM",
|
528 |
-
gr.Textbox(label="LEDs",
|
529 |
-
gr.Textbox(label="Experiments",
|
530 |
|
531 |
get_status.click(
|
532 |
fn=get_status_default,
|
533 |
-
inputs=[experiment_input]
|
|
|
534 |
)
|
535 |
|
536 |
with gr.Blocks():
|
|
|
508 |
|
509 |
while experiment is None and (time.time() - start) < timeout:
|
510 |
time.sleep(0.1)
|
511 |
+
|
512 |
+
return experiment, running, temp_mqtt_auto, rpm_mqtt, led_mqtt, experiments
|
513 |
|
514 |
# Define the interface components
|
515 |
with gr.Blocks() as demo:
|
|
|
523 |
gr.Markdown("# Status")
|
524 |
get_status = gr.Button("Get Status")
|
525 |
|
526 |
+
experiment_output = gr.Textbox(label="Experiment", interactive=False)
|
527 |
+
running_output = gr.Textbox(label="Running", interactive=False)
|
528 |
+
temp_output = gr.Textbox(label="Temperature Automation", interactive=False)
|
529 |
+
rpm_output = gr.Textbox(label="RPM", interactive=False)
|
530 |
+
led_output = gr.Textbox(label="LEDs", interactive=False)
|
531 |
+
experiments_output = gr.Textbox(label="Experiments", interactive=False)
|
532 |
|
533 |
get_status.click(
|
534 |
fn=get_status_default,
|
535 |
+
inputs=[experiment_input],
|
536 |
+
outputs=[experiment_output, running_output, temp_output, rpm_output, led_output, experiments_output]
|
537 |
)
|
538 |
|
539 |
with gr.Blocks():
|