linoyts HF staff commited on
Commit
c2a2454
β€’
1 Parent(s): 6ea5f8e

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -4
app.py CHANGED
@@ -195,7 +195,7 @@ with gr.Blocks(css=css) as demo:
195
  x = gr.Slider(minimum=-7, value=0, maximum=7, elem_id="x", interactive=False)
196
  y = gr.Slider(minimum=-7, value=0, maximum=7, elem_id="y", interactive=False)
197
  output_image = gr.Image(elem_id="image_out")
198
- generate = gr.Button("generate")
199
 
200
  with gr.Accordion(label="advanced options", open=False):
201
  iterations = gr.Slider(label = "num iterations", minimum=0, value=200, maximum=400)
@@ -223,7 +223,7 @@ with gr.Blocks(css=css) as demo:
223
  x_a = gr.Slider(minimum=-10, value=0, maximum=10, elem_id="x", interactive=False)
224
  y_a = gr.Slider(minimum=-10, value=0, maximum=10, elem_id="y", interactive=False)
225
  output_image_a = gr.Image(elem_id="image_out")
226
- generate_a = gr.Button("generate")
227
 
228
  with gr.Accordion(label="advanced options", open=False):
229
  iterations_a = gr.Slider(label = "num iterations", minimum=0, value=200, maximum=300)
@@ -255,8 +255,8 @@ with gr.Blocks(css=css) as demo:
255
  inputs=[slider_x, slider_y, prompt, seed, iterations, steps, guidance_scale, x_concept_1, x_concept_2, y_concept_1, y_concept_2, avg_diff_x_1, avg_diff_x_2, avg_diff_y_1, avg_diff_y_2],
256
  outputs=[x, y, x_concept_1, x_concept_2, y_concept_1, y_concept_2, avg_diff_x_1, avg_diff_x_2, avg_diff_y_1, avg_diff_y_2, output_image])
257
 
258
- generate.click(fn=update_scales, inputs=[x,y, prompt, seed, steps, guidance_scale, avg_diff_x_1, avg_diff_x_2, avg_diff_y_1, avg_diff_y_2], outputs=[output_image])
259
- generate_a.click(fn=update_scales, inputs=[x_a,y_a, prompt_a, seed_a, steps_a, guidance_scale_a, avg_diff_x_1, avg_diff_x_2, avg_diff_y_1, avg_diff_y_2, img2img_type, image, controlnet_conditioning_scale, ip_adapter_scale], outputs=[output_image_a])
260
  #x.change(fn=update_scales, inputs=[x,y, prompt, seed, steps, guidance_scale, avg_diff_x_1, avg_diff_x_2, avg_diff_y_1, avg_diff_y_2], outputs=[output_image])
261
  #y.change(fn=update_scales, inputs=[x,y, prompt, seed, steps, guidance_scale, avg_diff_x_1, avg_diff_x_2, avg_diff_y_1, avg_diff_y_2], outputs=[output_image])
262
  submit_a.click(fn=generate,
 
195
  x = gr.Slider(minimum=-7, value=0, maximum=7, elem_id="x", interactive=False)
196
  y = gr.Slider(minimum=-7, value=0, maximum=7, elem_id="y", interactive=False)
197
  output_image = gr.Image(elem_id="image_out")
198
+ generate_butt = gr.Button("generate")
199
 
200
  with gr.Accordion(label="advanced options", open=False):
201
  iterations = gr.Slider(label = "num iterations", minimum=0, value=200, maximum=400)
 
223
  x_a = gr.Slider(minimum=-10, value=0, maximum=10, elem_id="x", interactive=False)
224
  y_a = gr.Slider(minimum=-10, value=0, maximum=10, elem_id="y", interactive=False)
225
  output_image_a = gr.Image(elem_id="image_out")
226
+ generate_butt_a = gr.Button("generate")
227
 
228
  with gr.Accordion(label="advanced options", open=False):
229
  iterations_a = gr.Slider(label = "num iterations", minimum=0, value=200, maximum=300)
 
255
  inputs=[slider_x, slider_y, prompt, seed, iterations, steps, guidance_scale, x_concept_1, x_concept_2, y_concept_1, y_concept_2, avg_diff_x_1, avg_diff_x_2, avg_diff_y_1, avg_diff_y_2],
256
  outputs=[x, y, x_concept_1, x_concept_2, y_concept_1, y_concept_2, avg_diff_x_1, avg_diff_x_2, avg_diff_y_1, avg_diff_y_2, output_image])
257
 
258
+ generate_butt.click(fn=update_scales, inputs=[x,y, prompt, seed, steps, guidance_scale, avg_diff_x_1, avg_diff_x_2, avg_diff_y_1, avg_diff_y_2], outputs=[output_image])
259
+ generate_butt_a.click(fn=update_scales, inputs=[x_a,y_a, prompt_a, seed_a, steps_a, guidance_scale_a, avg_diff_x_1, avg_diff_x_2, avg_diff_y_1, avg_diff_y_2, img2img_type, image, controlnet_conditioning_scale, ip_adapter_scale], outputs=[output_image_a])
260
  #x.change(fn=update_scales, inputs=[x,y, prompt, seed, steps, guidance_scale, avg_diff_x_1, avg_diff_x_2, avg_diff_y_1, avg_diff_y_2], outputs=[output_image])
261
  #y.change(fn=update_scales, inputs=[x,y, prompt, seed, steps, guidance_scale, avg_diff_x_1, avg_diff_x_2, avg_diff_y_1, avg_diff_y_2], outputs=[output_image])
262
  submit_a.click(fn=generate,