concauu commited on
Commit
9b5d548
·
verified ·
1 Parent(s): fc18b7e

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +12 -12
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
- fn=infer,
219
- inputs=[enhanced_prompt, seed, randomize_seed, width, height, guidance_scale, num_inference_steps],
220
- outputs=[result, seed]
221
- ).then(
222
- fn=append_to_history,
223
- inputs=[result, enhanced_prompt, seed, width, height, guidance_scale, num_inference_steps, history_state],
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,
 
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,