linx5o commited on
Commit
da0660f
1 Parent(s): fd60351
Files changed (1) hide show
  1. app.py +10 -7
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", value=experiment, readonly=True)
525
- gr.Textbox(label="Running", value=running, readonly=True)
526
- gr.Textbox(label="Temperature Automation", value=temp_mqtt_auto, readonly=True)
527
- gr.Textbox(label="RPM", value=rpm_mqtt, readonly=True)
528
- gr.Textbox(label="LEDs", value=led_mqtt, readonly=True)
529
- gr.Textbox(label="Experiments", value=experiments, readonly=True)
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():