multimodalart HF staff commited on
Commit
06bf887
1 Parent(s): 008aa9b

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -3
app.py CHANGED
@@ -94,8 +94,9 @@ def shuffle_images():
94
  prompt_description_1 = gr.update(value=description_1, visible=True)
95
  prompt_description_2 = gr.update(value=description_2, visible=True)
96
  prompt = gr.update(value=f"{trigger_word_1} {trigger_word_2}")
 
97
 
98
- return title_1, prompt_description_1, title_2, prompt_description_2, prompt, two_shuffled_items
99
 
100
  with gr.Blocks(css=css) as demo:
101
  shuffled_items = gr.State()
@@ -135,8 +136,8 @@ with gr.Blocks(css=css) as demo:
135
  lora_2_scale = gr.Slider(label="LoRa 2 Scale", minimum=0, maximum=1, step=0.1, value=0.7)
136
  shuffle_button = gr.Button("Reshuffle!")
137
 
138
- demo.load(shuffle_images, inputs=[], outputs=[lora_1, lora_1_prompt, lora_2, lora_2_prompt, prompt, shuffled_items], queue=False, show_progress="hidden")
139
- shuffle_button.click(shuffle_images, outputs=[lora_1, lora_1_prompt, lora_2, lora_2_prompt, prompt, shuffled_items], queue=False, show_progress="hidden")
140
 
141
  run_btn.click(merge_and_run, inputs=[prompt, negative_prompt, shuffled_items, lora_1_scale, lora_2_scale], outputs=[output_image])
142
  prompt.submit(merge_and_run, inputs=[prompt, negative_prompt, shuffled_items, lora_1_scale, lora_2_scale], outputs=[output_image])
 
94
  prompt_description_1 = gr.update(value=description_1, visible=True)
95
  prompt_description_2 = gr.update(value=description_2, visible=True)
96
  prompt = gr.update(value=f"{trigger_word_1} {trigger_word_2}")
97
+ scale = gr.update(value=0.7)
98
 
99
+ return title_1, prompt_description_1, title_2, prompt_description_2, prompt, two_shuffled_items, scale, scale
100
 
101
  with gr.Blocks(css=css) as demo:
102
  shuffled_items = gr.State()
 
136
  lora_2_scale = gr.Slider(label="LoRa 2 Scale", minimum=0, maximum=1, step=0.1, value=0.7)
137
  shuffle_button = gr.Button("Reshuffle!")
138
 
139
+ demo.load(shuffle_images, inputs=[], outputs=[lora_1, lora_1_prompt, lora_2, lora_2_prompt, prompt, shuffled_items, lora_1_scale, lora_2_scale], queue=False, show_progress="hidden")
140
+ shuffle_button.click(shuffle_images, outputs=[lora_1, lora_1_prompt, lora_2, lora_2_prompt, prompt, shuffled_items, lora_1_scale, lora_2_scale], queue=False, show_progress="hidden")
141
 
142
  run_btn.click(merge_and_run, inputs=[prompt, negative_prompt, shuffled_items, lora_1_scale, lora_2_scale], outputs=[output_image])
143
  prompt.submit(merge_and_run, inputs=[prompt, negative_prompt, shuffled_items, lora_1_scale, lora_2_scale], outputs=[output_image])