Update app.py
Browse files
app.py
CHANGED
@@ -227,19 +227,6 @@ with gr.Blocks(css=css, theme=theme) as app:
|
|
227 |
with gr.Row():
|
228 |
height = gr.Slider(label="Height", minimum=512, maximum=2048, step=8, value=1152,interactive=True,)
|
229 |
|
230 |
-
with gr.Tab("Upscaling Settings"):
|
231 |
-
with gr.Column():
|
232 |
-
with gr.Row():
|
233 |
-
scale_by = gr.Number(show_label=True, label="How many times to increase:", minimum=1, maximum=2, value=2, step=1)
|
234 |
-
with gr.Row():
|
235 |
-
method = gr.Dropdown(show_label=True, value="ESRGAN_4x", label="Increasing algorithm", choices=["ScuNET GAN", "SwinIR 4x", "ESRGAN_4x", "R-ESRGAN 4x+", "R-ESRGAN 4x+ Anime6B"])
|
236 |
-
with gr.Column():
|
237 |
-
with gr.Row():
|
238 |
-
gfpgan = gr.Slider(show_label=True, label="Effect GFPGAN (For facial improvement)", minimum=0, maximum=1, value=0, step=0.1)
|
239 |
-
with gr.Row():
|
240 |
-
codeformer = gr.Slider(show_label=True, label="Effect CodeFormer (Improve the face)", minimum=0, maximum=1, value=0, step=0.1)
|
241 |
-
|
242 |
-
|
243 |
with gr.Column():
|
244 |
text_button = gr.Button("Generate image", variant="primary", interactive=True, elem_id="generate")
|
245 |
with gr.Column():
|
@@ -250,9 +237,6 @@ with gr.Blocks(css=css, theme=theme) as app:
|
|
250 |
clear_prompt.click(lambda: (None, None), None, [prompt, image_output], queue=False, show_api=False)
|
251 |
|
252 |
|
253 |
-
img2img_b.click(mirror, inputs=[image_output, scale_by, method, gfpgan, codeformer], outputs=image_i2i, concurrency_limit=48)
|
254 |
-
|
255 |
-
|
256 |
app.queue(default_concurrency_limit=200, max_size=200) # <-- Sets up a queue with default parameters
|
257 |
if __name__ == "__main__":
|
258 |
app.launch()
|
|
|
227 |
with gr.Row():
|
228 |
height = gr.Slider(label="Height", minimum=512, maximum=2048, step=8, value=1152,interactive=True,)
|
229 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
230 |
with gr.Column():
|
231 |
text_button = gr.Button("Generate image", variant="primary", interactive=True, elem_id="generate")
|
232 |
with gr.Column():
|
|
|
237 |
clear_prompt.click(lambda: (None, None), None, [prompt, image_output], queue=False, show_api=False)
|
238 |
|
239 |
|
|
|
|
|
|
|
240 |
app.queue(default_concurrency_limit=200, max_size=200) # <-- Sets up a queue with default parameters
|
241 |
if __name__ == "__main__":
|
242 |
app.launch()
|