Spaces:
Runtime error
Runtime error
aa
Browse files- gradio_seg2image.py +3 -2
gradio_seg2image.py
CHANGED
|
@@ -85,7 +85,6 @@ def create_imgcomp(input_image, result_image): #(input_image, filename):
|
|
| 85 |
<body>
|
| 86 |
<div style="margin: 3rem;
|
| 87 |
font-family: Roboto, sans-serif">
|
| 88 |
-
<h1 style="color: green"> Testing image comp</h1>
|
| 89 |
</div> <div> <div class="image-slider"> <div> """ + htmltag + "</div> </div> </body> </html> "
|
| 90 |
return desc
|
| 91 |
|
|
@@ -158,6 +157,7 @@ def create_demo(process, max_images=12):
|
|
| 158 |
'longbody, lowres, bad anatomy, bad hands, missing fingers, extra digit, fewer digits, cropped, worst quality, low quality'
|
| 159 |
)
|
| 160 |
with gr.Column():
|
|
|
|
| 161 |
#result_gallery = gr.Gallery(label='Output', visible= False,
|
| 162 |
# show_label=False,
|
| 163 |
# elem_id='gallery').style(
|
|
@@ -167,6 +167,7 @@ def create_demo(process, max_images=12):
|
|
| 167 |
#filename = gr.Textbox(label="image file names", visible=False)
|
| 168 |
#b2 = gr.Button('Show Image-Comparison')
|
| 169 |
with gr.Box():
|
|
|
|
| 170 |
imagecomp = gr.HTML()
|
| 171 |
ips = [
|
| 172 |
input_image, prompt, a_prompt, n_prompt, num_samples,
|
|
@@ -174,7 +175,7 @@ def create_demo(process, max_images=12):
|
|
| 174 |
]
|
| 175 |
run_button.click(fn=process,
|
| 176 |
inputs=ips,
|
| 177 |
-
outputs=[result_image], #[result_gallery, imagecomp],
|
| 178 |
api_name='seg')
|
| 179 |
result_image.change(create_imgcomp, [input_image, result_image], [imagecomp])
|
| 180 |
#b2.click(create_imgcomp, [input_image, filename], [imagecomp])
|
|
|
|
| 85 |
<body>
|
| 86 |
<div style="margin: 3rem;
|
| 87 |
font-family: Roboto, sans-serif">
|
|
|
|
| 88 |
</div> <div> <div class="image-slider"> <div> """ + htmltag + "</div> </div> </body> </html> "
|
| 89 |
return desc
|
| 90 |
|
|
|
|
| 157 |
'longbody, lowres, bad anatomy, bad hands, missing fingers, extra digit, fewer digits, cropped, worst quality, low quality'
|
| 158 |
)
|
| 159 |
with gr.Column():
|
| 160 |
+
#<h4 style="color: green"> Observe the Ingenuity of ControlNet by comparing Input and Output images</h4>
|
| 161 |
#result_gallery = gr.Gallery(label='Output', visible= False,
|
| 162 |
# show_label=False,
|
| 163 |
# elem_id='gallery').style(
|
|
|
|
| 167 |
#filename = gr.Textbox(label="image file names", visible=False)
|
| 168 |
#b2 = gr.Button('Show Image-Comparison')
|
| 169 |
with gr.Box():
|
| 170 |
+
msg = gr.HTML()
|
| 171 |
imagecomp = gr.HTML()
|
| 172 |
ips = [
|
| 173 |
input_image, prompt, a_prompt, n_prompt, num_samples,
|
|
|
|
| 175 |
]
|
| 176 |
run_button.click(fn=process,
|
| 177 |
inputs=ips,
|
| 178 |
+
outputs=[result_image, msg], #[result_gallery, imagecomp],
|
| 179 |
api_name='seg')
|
| 180 |
result_image.change(create_imgcomp, [input_image, result_image], [imagecomp])
|
| 181 |
#b2.click(create_imgcomp, [input_image, filename], [imagecomp])
|