Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -66,16 +66,29 @@ with block:
|
|
66 |
input_image = gr.Image(sources=None, type="pil",label="Upload",height=600) # None for upload, ctrl+v and webcam
|
67 |
prompt = gr.Textbox(label="Prompt")
|
68 |
negative_prompt = gr.Textbox(label="Negative prompt", value="Logo,Watermark,Text,Ugly,Morbid,Extra fingers,Poorly drawn hands,Mutation,Blurry,Extra limbs,Gross proportions,Missing arms,Mutated hands,Long neck,Duplicate,Mutilated,Mutilated hands,Poorly drawn face,Deformed,Bad anatomy,Cloned face,Malformed limbs,Missing legs,Too many fingers")
|
69 |
-
num_steps = gr.Slider(label="Number of steps", minimum=
|
70 |
controlnet_conditioning_scale = gr.Slider(label="ControlNet conditioning scale", minimum=0.1, maximum=2.0, value=1.0, step=0.05)
|
71 |
seed = gr.Slider(label="Seed", minimum=0, maximum=2147483647, step=1, randomize=True,)
|
72 |
run_button = gr.Button(value="Generate")
|
73 |
|
74 |
|
75 |
with gr.Column():
|
76 |
-
result_gallery = gr.Image(label='Output', show_label=True, elem_id="
|
77 |
# result_gallery = gr.Gallery(label='Output', show_label=False, elem_id="gallery", columns=[1], height=600)
|
78 |
ips = [input_image, prompt, negative_prompt, num_steps, controlnet_conditioning_scale, seed]
|
79 |
run_button.click(fn=process, inputs=ips, outputs=[result_gallery])
|
80 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
81 |
block.launch(debug = True)
|
|
|
66 |
input_image = gr.Image(sources=None, type="pil",label="Upload",height=600) # None for upload, ctrl+v and webcam
|
67 |
prompt = gr.Textbox(label="Prompt")
|
68 |
negative_prompt = gr.Textbox(label="Negative prompt", value="Logo,Watermark,Text,Ugly,Morbid,Extra fingers,Poorly drawn hands,Mutation,Blurry,Extra limbs,Gross proportions,Missing arms,Mutated hands,Long neck,Duplicate,Mutilated,Mutilated hands,Poorly drawn face,Deformed,Bad anatomy,Cloned face,Malformed limbs,Missing legs,Too many fingers")
|
69 |
+
num_steps = gr.Slider(label="Number of steps", minimum=10, maximum=100, value=30, step=1)
|
70 |
controlnet_conditioning_scale = gr.Slider(label="ControlNet conditioning scale", minimum=0.1, maximum=2.0, value=1.0, step=0.05)
|
71 |
seed = gr.Slider(label="Seed", minimum=0, maximum=2147483647, step=1, randomize=True,)
|
72 |
run_button = gr.Button(value="Generate")
|
73 |
|
74 |
|
75 |
with gr.Column():
|
76 |
+
result_gallery = gr.Image(label='Output', type="pil", show_label=True, elem_id="output-img", height=600)
|
77 |
# result_gallery = gr.Gallery(label='Output', show_label=False, elem_id="gallery", columns=[1], height=600)
|
78 |
ips = [input_image, prompt, negative_prompt, num_steps, controlnet_conditioning_scale, seed]
|
79 |
run_button.click(fn=process, inputs=ips, outputs=[result_gallery])
|
80 |
|
81 |
+
gr.Examples(
|
82 |
+
examples=[
|
83 |
+
["./example1.png"],
|
84 |
+
["./example2.png"],
|
85 |
+
["./example3.png"],
|
86 |
+
["./example4.png"],
|
87 |
+
],
|
88 |
+
fn=predict,
|
89 |
+
inputs=[image],
|
90 |
+
cache_examples=False,
|
91 |
+
)
|
92 |
+
|
93 |
+
|
94 |
block.launch(debug = True)
|