Spaces:
Running on Zero
Running on Zero
fix config/scaffold logic
Browse files- app.py +1 -1
- utils/handle_events.py +1 -1
app.py
CHANGED
|
@@ -140,7 +140,7 @@ with gr.Blocks(title="RFD3 Test") as demo:
|
|
| 140 |
display_state.value = "Please Select a Batch and Design number to show sequence"
|
| 141 |
|
| 142 |
def generate(config_upload, scaffold_upload, num_batches, num_designs_per_batch, extra_args):
|
| 143 |
-
if config_upload is None
|
| 144 |
return None, None
|
| 145 |
if config_upload is not None and scaffold_upload is None:
|
| 146 |
gen_directory, gen_results = generation_with_input_config(config_upload, scaffold_upload, num_batches, num_designs_per_batch, extra_args)
|
|
|
|
| 140 |
display_state.value = "Please Select a Batch and Design number to show sequence"
|
| 141 |
|
| 142 |
def generate(config_upload, scaffold_upload, num_batches, num_designs_per_batch, extra_args):
|
| 143 |
+
if config_upload is None and scaffold_upload is None:
|
| 144 |
return None, None
|
| 145 |
if config_upload is not None and scaffold_upload is None:
|
| 146 |
gen_directory, gen_results = generation_with_input_config(config_upload, scaffold_upload, num_batches, num_designs_per_batch, extra_args)
|
utils/handle_events.py
CHANGED
|
@@ -121,7 +121,7 @@ def give_run_status(num_batches, num_designs_per_batch, config_upload, scaffold_
|
|
| 121 |
|
| 122 |
|
| 123 |
"""
|
| 124 |
-
if config_upload is None
|
| 125 |
return gr.update(value="Please ensure you have uploaded a configuration file: .yaml or .json")
|
| 126 |
if config_upload is not None and scaffold_upload is None:
|
| 127 |
return gr.update(value=f"Running unconditional generation for {num_batches} batches of {num_designs_per_batch}, config uploaded from file {os.path.basename(config_upload)}")
|
|
|
|
| 121 |
|
| 122 |
|
| 123 |
"""
|
| 124 |
+
if config_upload is None and scaffold_upload is None:
|
| 125 |
return gr.update(value="Please ensure you have uploaded a configuration file: .yaml or .json")
|
| 126 |
if config_upload is not None and scaffold_upload is None:
|
| 127 |
return gr.update(value=f"Running unconditional generation for {num_batches} batches of {num_designs_per_batch}, config uploaded from file {os.path.basename(config_upload)}")
|