Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -578,11 +578,11 @@ def canny_process_image(input_image, input_low_threshold, input_high_threshold,
|
|
578 |
return np.array(canny_2)
|
579 |
|
580 |
# Define the input and output interfaces
|
581 |
-
# canny_input_image = gr.
|
582 |
canny_input_image = gr.Image()
|
583 |
-
canny_input_low_threshold = gr.
|
584 |
-
canny_input_high_threshold = gr.
|
585 |
-
canny_input_invert = gr.
|
586 |
|
587 |
canny_outputs = gr.outputs.Image(type="numpy")
|
588 |
|
@@ -707,17 +707,17 @@ with gr.Blocks() as canny_blocks_interface:
|
|
707 |
''')
|
708 |
with gr.Row():
|
709 |
with gr.Column():
|
710 |
-
canny_input_prompt = gr.
|
711 |
with gr.Accordion(label='negative prompt (optional)', open=False):
|
712 |
-
canny_negative_prompt = gr.
|
713 |
-
canny_input_low_threshold = gr.
|
714 |
-
canny_input_high_threshold = gr.
|
715 |
# canny_input_seed = gr.Slider(0, 99999999999999, label="seed", dtype=int, value=random_seed, interactive=True, step=1)
|
716 |
canny_input_seed = gr.Slider(0, 99999999999999, label="seed", value=random_seed, interactive=True, step=1)
|
717 |
-
canny_input_invert = gr.
|
718 |
canny_input_rotate = gr.Dropdown([0, 90, 180, 270], label="rotate image (for smartphones)")
|
719 |
with gr.Column():
|
720 |
-
# canny_input_image = gr.
|
721 |
canny_input_image = gr.Image(label="input image")
|
722 |
go_button = gr.Button('generate image')
|
723 |
# with gr.Row():
|
@@ -792,11 +792,11 @@ with gr.Blocks() as canny_blocks_interface:
|
|
792 |
# return output_image[0][0]
|
793 |
|
794 |
|
795 |
-
# canny_input_prompt = gr.
|
796 |
-
# canny_input_image = gr.
|
797 |
-
# canny_input_low_threshold = gr.
|
798 |
-
# canny_input_high_threshold = gr.
|
799 |
-
# canny_input_invert = gr.
|
800 |
# canny_outputs = gr.outputs.Image(type="pil")
|
801 |
|
802 |
# make and launch the gradio app...
|
@@ -932,13 +932,13 @@ with gr.Blocks() as depth_controlnet_gradio:
|
|
932 |
gr.Markdown('''
|
933 |
## Inputs...
|
934 |
''')
|
935 |
-
input_prompt = gr.
|
936 |
-
# input_image = gr.
|
937 |
input_image = gr.Image(label="input image")
|
938 |
with gr.Accordion(label="options", open=False):
|
939 |
with gr.Row():
|
940 |
with gr.Column():
|
941 |
-
input_negative_prompt = gr.
|
942 |
with gr.Column():
|
943 |
# input_seed = gr.Slider(0, 99999999999999, label="seed", dtype=int, value=random_seed, interactive=True, step=1)
|
944 |
input_seed = gr.Slider(0, 99999999999999, label="seed", value=random_seed, interactive=True, step=1)
|
@@ -946,7 +946,7 @@ with gr.Blocks() as depth_controlnet_gradio:
|
|
946 |
with gr.Column():
|
947 |
input_rotate = gr.Dropdown([0, 90, 180, 270], label="rotate image (for smartphones)")
|
948 |
with gr.Column():
|
949 |
-
input_invert = gr.
|
950 |
submit = gr.Button('generate image')
|
951 |
|
952 |
with gr.Column():
|
|
|
578 |
return np.array(canny_2)
|
579 |
|
580 |
# Define the input and output interfaces
|
581 |
+
# canny_input_image = gr.Image()
|
582 |
canny_input_image = gr.Image()
|
583 |
+
canny_input_low_threshold = gr.Slider(minimum=0, maximum=1000, step=1, label="Lower Threshold:", default=100)
|
584 |
+
canny_input_high_threshold = gr.Slider(minimum=0, maximum=1000, step=1, label="Upper Threshold:", default=200)
|
585 |
+
canny_input_invert = gr.Checkbox(label="Invert Image")
|
586 |
|
587 |
canny_outputs = gr.outputs.Image(type="numpy")
|
588 |
|
|
|
707 |
''')
|
708 |
with gr.Row():
|
709 |
with gr.Column():
|
710 |
+
canny_input_prompt = gr.Textbox(label="enter your text prompt here")
|
711 |
with gr.Accordion(label='negative prompt (optional)', open=False):
|
712 |
+
canny_negative_prompt = gr.Textbox()
|
713 |
+
canny_input_low_threshold = gr.Slider(minimum=0, maximum=1000, step=1, label="Lower Threshold:", default=100)
|
714 |
+
canny_input_high_threshold = gr.Slider(minimum=0, maximum=1000, step=1, label="Upper Threshold:", default=120)
|
715 |
# canny_input_seed = gr.Slider(0, 99999999999999, label="seed", dtype=int, value=random_seed, interactive=True, step=1)
|
716 |
canny_input_seed = gr.Slider(0, 99999999999999, label="seed", value=random_seed, interactive=True, step=1)
|
717 |
+
canny_input_invert = gr.Checkbox(label="invert edge tracing image")
|
718 |
canny_input_rotate = gr.Dropdown([0, 90, 180, 270], label="rotate image (for smartphones)")
|
719 |
with gr.Column():
|
720 |
+
# canny_input_image = gr.Image(label="input image")
|
721 |
canny_input_image = gr.Image(label="input image")
|
722 |
go_button = gr.Button('generate image')
|
723 |
# with gr.Row():
|
|
|
792 |
# return output_image[0][0]
|
793 |
|
794 |
|
795 |
+
# canny_input_prompt = gr.Textbox(label="Enter a single word or phrase")
|
796 |
+
# canny_input_image = gr.Image()
|
797 |
+
# canny_input_low_threshold = gr.Slider(minimum=0, maximum=1000, step=1, label="Lower Threshold:", default=100)
|
798 |
+
# canny_input_high_threshold = gr.Slider(minimum=0, maximum=1000, step=1, label="Upper Threshold:", default=200)
|
799 |
+
# canny_input_invert = gr.Checkbox(label="Invert Image")
|
800 |
# canny_outputs = gr.outputs.Image(type="pil")
|
801 |
|
802 |
# make and launch the gradio app...
|
|
|
932 |
gr.Markdown('''
|
933 |
## Inputs...
|
934 |
''')
|
935 |
+
input_prompt = gr.Textbox(label="text prompt")
|
936 |
+
# input_image = gr.Image(label="input image")
|
937 |
input_image = gr.Image(label="input image")
|
938 |
with gr.Accordion(label="options", open=False):
|
939 |
with gr.Row():
|
940 |
with gr.Column():
|
941 |
+
input_negative_prompt = gr.Textbox(label="negative prompt")
|
942 |
with gr.Column():
|
943 |
# input_seed = gr.Slider(0, 99999999999999, label="seed", dtype=int, value=random_seed, interactive=True, step=1)
|
944 |
input_seed = gr.Slider(0, 99999999999999, label="seed", value=random_seed, interactive=True, step=1)
|
|
|
946 |
with gr.Column():
|
947 |
input_rotate = gr.Dropdown([0, 90, 180, 270], label="rotate image (for smartphones)")
|
948 |
with gr.Column():
|
949 |
+
input_invert = gr.Checkbox(label="invert depthmap")
|
950 |
submit = gr.Button('generate image')
|
951 |
|
952 |
with gr.Column():
|