multimodalart HF staff commited on
Commit
cec9c3b
1 Parent(s): 0d6817f

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +7 -5
app.py CHANGED
@@ -237,14 +237,16 @@ with gr.Blocks(css=css) as demo:
237
 
238
  run_btn.click(hide_post_gen_info, outputs=[post_gen_info], queue=False).then(merge_and_run,
239
  inputs=[prompt, negative_prompt, shuffled_items, lora_1_scale, lora_2_scale, seed],
240
- outputs=[output_image, post_gen_info, last_used_seed, thumbs_up, thumbs_up_clicked, thumbs_down, thumbs_down_clicked])
 
241
  prompt.submit(hide_post_gen_info, outputs=[post_gen_info], queue=False).then(merge_and_run,
242
  inputs=[prompt, negative_prompt, shuffled_items, lora_1_scale, lora_2_scale, seed],
243
- outputs=[output_image, post_gen_info, last_used_seed, thumbs_up, thumbs_up_clicked, thumbs_down, thumbs_down_clicked])
 
244
 
245
- thumbs_up.click(save_preferences, inputs=[lora_1_id, lora_1_scale, lora_2_id, lora_2_scale, prompt, output_image, gr.State("up"), last_used_seed], outputs=[thumbs_up, thumbs_up_clicked, thumbs_down])
246
- thumbs_down.click(save_preferences, inputs=[lora_1_id, lora_1_scale, lora_2_id, lora_2_scale, prompt, output_image, gr.State("down"), last_used_seed], outputs=[thumbs_down, thumbs_down_clicked, thumbs_up])
247
  share_button.click(None, [], [], js=share_js)
248
 
249
- demo.queue(concurrency_count=2)
250
  demo.launch()
 
237
 
238
  run_btn.click(hide_post_gen_info, outputs=[post_gen_info], queue=False).then(merge_and_run,
239
  inputs=[prompt, negative_prompt, shuffled_items, lora_1_scale, lora_2_scale, seed],
240
+ outputs=[output_image, post_gen_info, last_used_seed, thumbs_up, thumbs_up_clicked, thumbs_down, thumbs_down_clicked],
241
+ concurrency_limit=2)
242
  prompt.submit(hide_post_gen_info, outputs=[post_gen_info], queue=False).then(merge_and_run,
243
  inputs=[prompt, negative_prompt, shuffled_items, lora_1_scale, lora_2_scale, seed],
244
+ outputs=[output_image, post_gen_info, last_used_seed, thumbs_up, thumbs_up_clicked, thumbs_down, thumbs_down_clicked],
245
+ concurrency_limit=2)
246
 
247
+ thumbs_up.click(save_preferences, inputs=[lora_1_id, lora_1_scale, lora_2_id, lora_2_scale, prompt, output_image, gr.State("up"), last_used_seed], outputs=[thumbs_up, thumbs_up_clicked, thumbs_down], queue=False)
248
+ thumbs_down.click(save_preferences, inputs=[lora_1_id, lora_1_scale, lora_2_id, lora_2_scale, prompt, output_image, gr.State("down"), last_used_seed], outputs=[thumbs_down, thumbs_down_clicked, thumbs_up], queue=False)
249
  share_button.click(None, [], [], js=share_js)
250
 
251
+ demo.queue()
252
  demo.launch()