Spaces:
Running on Zero
Running on Zero
update generation message when run completes
Browse files
app.py
CHANGED
|
@@ -64,7 +64,7 @@ with gr.Blocks(title="RFD3 Test") as demo:
|
|
| 64 |
)
|
| 65 |
|
| 66 |
config_validation_btn = gr.Button("Validate Config")
|
| 67 |
-
config_textbox = gr.Textbox(value ="Waiting for config validation...")
|
| 68 |
|
| 69 |
with gr.Accordion(label="Advanced Options", open=False):
|
| 70 |
extra_args = gr.Textbox(
|
|
@@ -80,9 +80,9 @@ with gr.Blocks(title="RFD3 Test") as demo:
|
|
| 80 |
with gr.Row():
|
| 81 |
scaffold_validation_btn = gr.Button("Validate Scaffold")
|
| 82 |
no_input_btn = gr.Button("No Scaffold/Target")
|
| 83 |
-
scaffold_textbox = gr.Textbox(value ="Waiting for scaffold validation...")
|
| 84 |
run_btn = gr.Button("Run Generation", variant="primary")
|
| 85 |
-
runtextbox = gr.Textbox(value="Waiting for generation run...")
|
| 86 |
|
| 87 |
|
| 88 |
|
|
@@ -119,7 +119,7 @@ with gr.Blocks(title="RFD3 Test") as demo:
|
|
| 119 |
else:
|
| 120 |
return None, None
|
| 121 |
|
| 122 |
-
run_btn.click(give_run_status, inputs=[config_ready, scaffold_ready, num_batches, num_designs_per_batch, config_upload], outputs=runtextbox
|
| 123 |
generate, inputs=[config_ready, scaffold_ready, num_batches, num_designs_per_batch, config_upload, extra_args], outputs=[gen_directory, gen_results]
|
| 124 |
).then(
|
| 125 |
update_batch_choices,
|
|
@@ -129,6 +129,10 @@ with gr.Blocks(title="RFD3 Test") as demo:
|
|
| 129 |
download_results_as_zip,
|
| 130 |
inputs=gen_directory,
|
| 131 |
outputs=output_file
|
|
|
|
|
|
|
|
|
|
|
|
|
| 132 |
)
|
| 133 |
|
| 134 |
|
|
|
|
| 64 |
)
|
| 65 |
|
| 66 |
config_validation_btn = gr.Button("Validate Config")
|
| 67 |
+
config_textbox = gr.Textbox(label="Configuration status", value ="Waiting for config validation...")
|
| 68 |
|
| 69 |
with gr.Accordion(label="Advanced Options", open=False):
|
| 70 |
extra_args = gr.Textbox(
|
|
|
|
| 80 |
with gr.Row():
|
| 81 |
scaffold_validation_btn = gr.Button("Validate Scaffold")
|
| 82 |
no_input_btn = gr.Button("No Scaffold/Target")
|
| 83 |
+
scaffold_textbox = gr.Textbox(label="Scaffold/Target status", value ="Waiting for scaffold validation...")
|
| 84 |
run_btn = gr.Button("Run Generation", variant="primary")
|
| 85 |
+
runtextbox = gr.Textbox(label="Run status", value="Waiting for generation run...")
|
| 86 |
|
| 87 |
|
| 88 |
|
|
|
|
| 119 |
else:
|
| 120 |
return None, None
|
| 121 |
|
| 122 |
+
run_btn.click(give_run_status, inputs=[config_ready, scaffold_ready, num_batches, num_designs_per_batch, config_upload], outputs=runtextbox.then(
|
| 123 |
generate, inputs=[config_ready, scaffold_ready, num_batches, num_designs_per_batch, config_upload, extra_args], outputs=[gen_directory, gen_results]
|
| 124 |
).then(
|
| 125 |
update_batch_choices,
|
|
|
|
| 129 |
download_results_as_zip,
|
| 130 |
inputs=gen_directory,
|
| 131 |
outputs=output_file
|
| 132 |
+
).then(
|
| 133 |
+
lambda gen_results: gr.update(value="Generation completed!") if gen_results is not None else gr.update(),
|
| 134 |
+
inputs=gen_results,
|
| 135 |
+
outputs=runtextbox
|
| 136 |
)
|
| 137 |
|
| 138 |
|