Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -201,36 +201,17 @@ title = """<h1 align="center">Image Upscaler with Tile Controlnet</h1>
|
|
| 201 |
</center></p>
|
| 202 |
"""
|
| 203 |
|
| 204 |
-
|
| 205 |
-
|
| 206 |
-
|
| 207 |
-
|
| 208 |
-
|
| 209 |
-
|
| 210 |
-
|
| 211 |
-
|
| 212 |
-
|
| 213 |
-
|
| 214 |
-
|
| 215 |
-
|
| 216 |
-
|
| 217 |
-
|
| 218 |
-
|
| 219 |
-
run_button.click(fn=gradio_process_image,
|
| 220 |
-
inputs=[input_image, resolution, num_inference_steps, strength, hdr, guidance_scale],
|
| 221 |
-
outputs=output_slider)
|
| 222 |
-
|
| 223 |
-
# Add examples with all required inputs
|
| 224 |
-
gr.Examples(
|
| 225 |
-
examples=[
|
| 226 |
-
["image1.jpg", 512, 20, 0.4, 0, 3],
|
| 227 |
-
["image2.png", 512, 20, 0.4, 0, 3],
|
| 228 |
-
["image3.png", 512, 20, 0.4, 0, 3],
|
| 229 |
-
],
|
| 230 |
-
inputs=[input_image, resolution, num_inference_steps, strength, hdr, guidance_scale],
|
| 231 |
-
outputs=output_slider,
|
| 232 |
-
fn=gradio_process_image,
|
| 233 |
-
cache_examples=True,
|
| 234 |
-
)
|
| 235 |
-
|
| 236 |
-
demo.launch(share=True)
|
|
|
|
| 201 |
</center></p>
|
| 202 |
"""
|
| 203 |
|
| 204 |
+
demo = gr.Interface(
|
| 205 |
+
fn=gradio_process_image,
|
| 206 |
+
inputs=[
|
| 207 |
+
gr.Image(type="pil", label="Input Image"),
|
| 208 |
+
gr.Slider(minimum=256, maximum=2048, value=512, step=256, label="Resolution"),
|
| 209 |
+
gr.Slider(minimum=1, maximum=50, value=20, step=1, label="Number of Inference Steps"),
|
| 210 |
+
gr.Slider(minimum=0, maximum=1, value=0.4, step=0.01, label="Strength"),
|
| 211 |
+
gr.Slider(minimum=0, maximum=1, value=0, step=0.1, label="HDR Effect"),
|
| 212 |
+
gr.Slider(minimum=0, maximum=20, value=3, step=0.5, label="Guidance Scale")
|
| 213 |
+
],
|
| 214 |
+
outputs=ImageSlider(label="Before / After", type="numpy"),
|
| 215 |
+
title="Image Upscaler with Tile Controlnet"
|
| 216 |
+
)
|
| 217 |
+
demo.launch()
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|