Update app.py
Browse files
app.py
CHANGED
|
@@ -116,12 +116,15 @@ def add_to_queue(student_id, R, Y, B):
|
|
| 116 |
"RYB Volumes (µL)": {"R": R, "Y": Y, "B": B},
|
| 117 |
"well":selected_well,
|
| 118 |
}
|
| 119 |
-
|
| 120 |
# When processing starts
|
| 121 |
-
yield {"Status": "In Progress", "Message": "Experiment is running..."}
|
| 122 |
-
|
| 123 |
-
|
| 124 |
-
|
|
|
|
|
|
|
|
|
|
| 125 |
|
| 126 |
# Start Task Processor Thread
|
| 127 |
def task_processor():
|
|
|
|
| 116 |
"RYB Volumes (µL)": {"R": R, "Y": Y, "B": B},
|
| 117 |
"well":selected_well,
|
| 118 |
}
|
| 119 |
+
|
| 120 |
# When processing starts
|
| 121 |
+
yield {"Status": "In Progress", "Message": "Experiment is running..."}
|
| 122 |
+
|
| 123 |
+
while True:
|
| 124 |
+
result = result_queue.get() # This will block until the result is available
|
| 125 |
+
if result["Experiment ID"] == experiment_id:
|
| 126 |
+
yield result # Return the updated result to the Gradio interface
|
| 127 |
+
break
|
| 128 |
|
| 129 |
# Start Task Processor Thread
|
| 130 |
def task_processor():
|