Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -215,18 +215,18 @@ with gr.Blocks(css=css) as demo:
|
|
| 215 |
|
| 216 |
# Event handling
|
| 217 |
generation_event = run_button.click(
|
| 218 |
-
|
| 219 |
-
|
| 220 |
-
|
| 221 |
-
|
| 222 |
-
|
| 223 |
-
|
| 224 |
-
|
| 225 |
-
|
| 226 |
-
|
| 227 |
-
|
| 228 |
-
|
| 229 |
-
|
| 230 |
|
| 231 |
enhanced_prompt.submit(
|
| 232 |
fn=infer,
|
|
|
|
| 215 |
|
| 216 |
# Event handling
|
| 217 |
generation_event = run_button.click(
|
| 218 |
+
fn=infer,
|
| 219 |
+
inputs=[enhanced_prompt, seed, randomize_seed, width, height, guidance_scale, num_inference_steps],
|
| 220 |
+
outputs=[result, seed] # Image is OUTPUT here
|
| 221 |
+
).then(
|
| 222 |
+
fn=append_to_history,
|
| 223 |
+
inputs=[result, enhanced_prompt, seed, width, height, guidance_scale, num_inference_steps, history_state], # Image becomes INPUT here
|
| 224 |
+
outputs=history_state
|
| 225 |
+
).then(
|
| 226 |
+
fn=create_history_html,
|
| 227 |
+
inputs=history_state,
|
| 228 |
+
outputs=history_display
|
| 229 |
+
)
|
| 230 |
|
| 231 |
enhanced_prompt.submit(
|
| 232 |
fn=infer,
|