Spaces:
Running
on
Zero
Running
on
Zero
scroll_to_output updates
Browse files- app.py +5 -5
- utils/hex_hura.py +1 -1
app.py
CHANGED
@@ -1662,12 +1662,12 @@ with gr.Blocks(css_paths="style_20250314.css", title=title, theme='Surn/beeuty',
|
|
1662 |
composite_button.click(
|
1663 |
fn=lambda input_image, composite_color, composite_opacity: gr.Warning("Please upload an Input Image to get started.") if input_image is None else change_color(input_image, composite_color, composite_opacity),
|
1664 |
inputs=[input_image, composite_color, composite_opacity],
|
1665 |
-
outputs=[input_image]
|
1666 |
)
|
1667 |
composite_sketch_button.click(
|
1668 |
fn=lambda sketch_image, composite_color, composite_opacity: gr.Warning("Please upload an Sketch Image to get started.") if sketch_image is None else change_color(sketch_image, composite_color, composite_opacity),
|
1669 |
inputs=[sketch_image, composite_color, composite_opacity],
|
1670 |
-
outputs=[sketch_image]
|
1671 |
)
|
1672 |
composite_hura_button.click(
|
1673 |
fn=lambda hura_image, composite_color, composite_opacity: gr.Warning("Please create a HURA to get started.") if hex_components["target_image"] is None else change_color(hura_image, composite_color, composite_opacity),
|
@@ -1679,15 +1679,15 @@ with gr.Blocks(css_paths="style_20250314.css", title=title, theme='Surn/beeuty',
|
|
1679 |
blur_button.click(
|
1680 |
fn=lambda input_image, blur_amount: gr.Warning("Please upload an Input Image to get started.") if input_image is None else blur_image(input_image, blur_amount),
|
1681 |
inputs=[input_image, blur_amount],
|
1682 |
-
outputs=[input_image])
|
1683 |
blur_sketch_button.click(
|
1684 |
fn=lambda sketch_image, blur_amount: gr.Warning("Please upload an Sketch Image to get started.") if sketch_image is None else blur_image(sketch_image, blur_amount),
|
1685 |
inputs=[sketch_image, blur_amount],
|
1686 |
-
outputs=[sketch_image])
|
1687 |
blur_hura_button.click(
|
1688 |
fn=lambda hura_image, blur_amount: gr.Warning("Please create a HURA to get started.") if hex_components["target_image"] is None else blur_image(hura_image, blur_amount),
|
1689 |
inputs=[hex_components["target_image"], blur_amount],
|
1690 |
-
outputs=[hex_components["target_image"]])
|
1691 |
################ end special effects ############################
|
1692 |
#use conditioned_image as the input_image for generate_input_image_click
|
1693 |
generate_input_image_from_gallery.click(
|
|
|
1662 |
composite_button.click(
|
1663 |
fn=lambda input_image, composite_color, composite_opacity: gr.Warning("Please upload an Input Image to get started.") if input_image is None else change_color(input_image, composite_color, composite_opacity),
|
1664 |
inputs=[input_image, composite_color, composite_opacity],
|
1665 |
+
outputs=[input_image], scroll_to_output=True
|
1666 |
)
|
1667 |
composite_sketch_button.click(
|
1668 |
fn=lambda sketch_image, composite_color, composite_opacity: gr.Warning("Please upload an Sketch Image to get started.") if sketch_image is None else change_color(sketch_image, composite_color, composite_opacity),
|
1669 |
inputs=[sketch_image, composite_color, composite_opacity],
|
1670 |
+
outputs=[sketch_image], scroll_to_output=True
|
1671 |
)
|
1672 |
composite_hura_button.click(
|
1673 |
fn=lambda hura_image, composite_color, composite_opacity: gr.Warning("Please create a HURA to get started.") if hex_components["target_image"] is None else change_color(hura_image, composite_color, composite_opacity),
|
|
|
1679 |
blur_button.click(
|
1680 |
fn=lambda input_image, blur_amount: gr.Warning("Please upload an Input Image to get started.") if input_image is None else blur_image(input_image, blur_amount),
|
1681 |
inputs=[input_image, blur_amount],
|
1682 |
+
outputs=[input_image], scroll_to_output=True)
|
1683 |
blur_sketch_button.click(
|
1684 |
fn=lambda sketch_image, blur_amount: gr.Warning("Please upload an Sketch Image to get started.") if sketch_image is None else blur_image(sketch_image, blur_amount),
|
1685 |
inputs=[sketch_image, blur_amount],
|
1686 |
+
outputs=[sketch_image], scroll_to_output=True)
|
1687 |
blur_hura_button.click(
|
1688 |
fn=lambda hura_image, blur_amount: gr.Warning("Please create a HURA to get started.") if hex_components["target_image"] is None else blur_image(hura_image, blur_amount),
|
1689 |
inputs=[hex_components["target_image"], blur_amount],
|
1690 |
+
outputs=[hex_components["target_image"]], scroll_to_output=True)
|
1691 |
################ end special effects ############################
|
1692 |
#use conditioned_image as the input_image for generate_input_image_click
|
1693 |
generate_input_image_from_gallery.click(
|
utils/hex_hura.py
CHANGED
@@ -411,7 +411,7 @@ def render() -> dict:
|
|
411 |
generate_button.click(
|
412 |
fn=_generate_pattern_from_state,
|
413 |
inputs=[pattern_type, width_slider, height_slider, v_value_slider, r_value_slider, state_colors],
|
414 |
-
outputs=target_image
|
415 |
)
|
416 |
|
417 |
v_value_slider.input(
|
|
|
411 |
generate_button.click(
|
412 |
fn=_generate_pattern_from_state,
|
413 |
inputs=[pattern_type, width_slider, height_slider, v_value_slider, r_value_slider, state_colors],
|
414 |
+
outputs=target_image, scroll_to_output=True
|
415 |
)
|
416 |
|
417 |
v_value_slider.input(
|