linoyts HF staff commited on
Commit
1e4841f
1 Parent(s): 0ab52e6

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -148,8 +148,8 @@ with gr.Blocks(css=css) as demo:
148
  x = gr.Slider(minimum=-4, value=0, maximum=4, elem_id="x", interactive=False)
149
  #y = gr.Slider(minimum=-10, value=0, maximum=10, elem_id="y", interactive=False)
150
  output_image = gr.Image(elem_id="image_out")
151
- with gr.Row():
152
- generate_butt = gr.Button("generate")
153
 
154
  with gr.Accordion(label="advanced options", open=False):
155
  iterations = gr.Slider(label = "num iterations", minimum=0, value=300, maximum=400)
@@ -222,7 +222,7 @@ with gr.Blocks(css=css) as demo:
222
  inputs=[slider_x, prompt, seed, iterations, steps, guidance_scale, x_concept_1, x_concept_2, avg_diff_x],
223
  outputs=[x, x_concept_1, x_concept_2, avg_diff_x, output_image])
224
 
225
- generate_butt.click(fn=update_scales, inputs=[x, prompt, seed, steps, guidance_scale, avg_diff_x], outputs=[output_image])
226
  # generate_butt_a.click(fn=update_scales, inputs=[x_a,y_a, prompt_a, seed_a, steps_a, guidance_scale_a, avg_diff_x, avg_diff_y, img2img_type, image, controlnet_conditioning_scale, ip_adapter_scale], outputs=[output_image_a])
227
  # submit_a.click(fn=generate,
228
  # inputs=[slider_x_a, slider_y_a, prompt_a, seed_a, iterations_a, steps_a, guidance_scale_a, x_concept_1, x_concept_2, y_concept_1, y_concept_2, avg_diff_x, avg_diff_y, img2img_type, image, controlnet_conditioning_scale, ip_adapter_scale],
 
148
  x = gr.Slider(minimum=-4, value=0, maximum=4, elem_id="x", interactive=False)
149
  #y = gr.Slider(minimum=-10, value=0, maximum=10, elem_id="y", interactive=False)
150
  output_image = gr.Image(elem_id="image_out")
151
+ # with gr.Row():
152
+ # generate_butt = gr.Button("generate")
153
 
154
  with gr.Accordion(label="advanced options", open=False):
155
  iterations = gr.Slider(label = "num iterations", minimum=0, value=300, maximum=400)
 
222
  inputs=[slider_x, prompt, seed, iterations, steps, guidance_scale, x_concept_1, x_concept_2, avg_diff_x],
223
  outputs=[x, x_concept_1, x_concept_2, avg_diff_x, output_image])
224
 
225
+ x.change(fn=update_scales, inputs=[x, prompt, seed, steps, guidance_scale, avg_diff_x], outputs=[output_image])
226
  # generate_butt_a.click(fn=update_scales, inputs=[x_a,y_a, prompt_a, seed_a, steps_a, guidance_scale_a, avg_diff_x, avg_diff_y, img2img_type, image, controlnet_conditioning_scale, ip_adapter_scale], outputs=[output_image_a])
227
  # submit_a.click(fn=generate,
228
  # inputs=[slider_x_a, slider_y_a, prompt_a, seed_a, iterations_a, steps_a, guidance_scale_a, x_concept_1, x_concept_2, y_concept_1, y_concept_2, avg_diff_x, avg_diff_y, img2img_type, image, controlnet_conditioning_scale, ip_adapter_scale],