Sebastiankay commited on
Commit
5917c10
1 Parent(s): 17ca49c

Sep 10, 2024, 7:19 PM

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -247,7 +247,7 @@ with gr.Blocks(theme=theme, head=custom_head, css=custom_css, js=custom_js, titl
247
 
248
  image_ratio_buttons.input(fn=calculate_ratio_values, inputs=[image_ratio_buttons, image_width, image_height], outputs=[image_width, image_height], show_progress="hidden")
249
 
250
- run_button.click(fn=process, inputs=[text_prompt, image_width, image_height, image_seed, randomize_seed], outputs=[text_prompt, output_image, output_url, outpu_image_comment, image_informations, image_info_tb_prompt, image_info_tb_width, image_info_tb_height, image_info_tb_seed, image_download_button, output_dominant_image_color, image_seed])
251
 
252
  enhance_prompt_button.click(fn=groq_enhance_process, inputs=[text_prompt], outputs=[text_prompt])
253
  random_prompt_button.click(fn=groq_enhance_process, inputs=None, outputs=[text_prompt])
 
247
 
248
  image_ratio_buttons.input(fn=calculate_ratio_values, inputs=[image_ratio_buttons, image_width, image_height], outputs=[image_width, image_height], show_progress="hidden")
249
 
250
+ run_button.click(fn=lambda: {"interactive": False, "__type__": "update"}, outputs=[run_button]).then(fn=process, inputs=[text_prompt, image_width, image_height, image_seed, randomize_seed], outputs=[text_prompt, output_image, output_url, outpu_image_comment, image_informations, image_info_tb_prompt, image_info_tb_width, image_info_tb_height, image_info_tb_seed, image_download_button, output_dominant_image_color, image_seed]).then(fn=lambda: {"interactive": True, "__type__": "update"}, outputs=[run_button])
251
 
252
  enhance_prompt_button.click(fn=groq_enhance_process, inputs=[text_prompt], outputs=[text_prompt])
253
  random_prompt_button.click(fn=groq_enhance_process, inputs=None, outputs=[text_prompt])