Spaces:
Running
on
Zero
Running
on
Zero
fix a bug
Browse files
Rodin.py
CHANGED
@@ -149,9 +149,9 @@ class Generator:
|
|
149 |
_, self.token = login(self.user_id, self.password)
|
150 |
continue
|
151 |
else:
|
152 |
-
|
153 |
-
|
154 |
-
|
155 |
processed_image = "data:image/png;base64," + preprocess_response.get('processed_image', None)
|
156 |
success = True
|
157 |
except Exception as e:
|
|
|
149 |
_, self.token = login(self.user_id, self.password)
|
150 |
continue
|
151 |
else:
|
152 |
+
try:
|
153 |
+
if not (prompt and task_uuid):
|
154 |
+
prompt = preprocess_response.get('prompt', None)
|
155 |
processed_image = "data:image/png;base64," + preprocess_response.get('processed_image', None)
|
156 |
success = True
|
157 |
except Exception as e:
|
app.py
CHANGED
@@ -165,11 +165,6 @@ with gr.Blocks() as demo:
|
|
165 |
).then(fn=clear_task, outputs=[cache_task_uuid, block_prompt, block_prompt_hint, fake3d], show_progress="hidden")
|
166 |
|
167 |
button_generate.click(
|
168 |
-
fn=do_nothing,
|
169 |
-
js=change_button_name,
|
170 |
-
inputs=[cacha_empty],
|
171 |
-
outputs=[cacha_empty]
|
172 |
-
).success(
|
173 |
fn=generator.preprocess,
|
174 |
inputs=[block_prompt, block_image, cache_image_base64, cache_task_uuid],
|
175 |
outputs=[block_prompt, cache_image_base64],
|
|
|
165 |
).then(fn=clear_task, outputs=[cache_task_uuid, block_prompt, block_prompt_hint, fake3d], show_progress="hidden")
|
166 |
|
167 |
button_generate.click(
|
|
|
|
|
|
|
|
|
|
|
168 |
fn=generator.preprocess,
|
169 |
inputs=[block_prompt, block_image, cache_image_base64, cache_task_uuid],
|
170 |
outputs=[block_prompt, cache_image_base64],
|