Update app.py
Browse files
app.py
CHANGED
@@ -289,7 +289,8 @@ with gr.Blocks(css=css, theme=theme) as app:
|
|
289 |
height = gr.Slider(label="Height", minimum=512, maximum=2048, step=8, value=1152,interactive=True,)
|
290 |
with gr.Column():
|
291 |
text_button = gr.Button("Generate image", variant="primary", interactive=True, elem_id="generate")
|
292 |
-
|
|
|
293 |
with gr.Tab("Upscaling Settings"):
|
294 |
with gr.Column():
|
295 |
with gr.Row():
|
@@ -304,7 +305,7 @@ with gr.Blocks(css=css, theme=theme) as app:
|
|
304 |
|
305 |
|
306 |
with gr.Column():
|
307 |
-
image_output = gr.Image(show_download_button=True, interactive=False, label='Generated Image 🌄', show_share_button=False, format="png", type="filepath", elem_id="gallery")
|
308 |
|
309 |
text_button.click(query, inputs=[prompt, negative_prompt, task, steps, sampler, cfg_scale, seed, width, height], outputs=image_output, concurrency_limit=48)
|
310 |
clear_prompt =gr.Button("Clear 🗑️",variant="primary", elem_id="clear_button")
|
@@ -315,6 +316,6 @@ with gr.Blocks(css=css, theme=theme) as app:
|
|
315 |
img2img_b.click(mirror, inputs=[image_output, scale_by, method, gfpgan, codeformer], outputs=image_i2i, concurrency_limit=48)
|
316 |
|
317 |
|
318 |
-
|
319 |
if __name__ == "__main__":
|
320 |
app.launch()
|
|
|
289 |
height = gr.Slider(label="Height", minimum=512, maximum=2048, step=8, value=1152,interactive=True,)
|
290 |
with gr.Column():
|
291 |
text_button = gr.Button("Generate image", variant="primary", interactive=True, elem_id="generate")
|
292 |
+
image_output = gr.Image(show_download_button=True, interactive=False, label='Generated Image 🌄', show_share_button=False, format="png", type="filepath", elem_id="gallery")
|
293 |
+
|
294 |
with gr.Tab("Upscaling Settings"):
|
295 |
with gr.Column():
|
296 |
with gr.Row():
|
|
|
305 |
|
306 |
|
307 |
with gr.Column():
|
308 |
+
#image_output = gr.Image(show_download_button=True, interactive=False, label='Generated Image 🌄', show_share_button=False, format="png", type="filepath", elem_id="gallery")
|
309 |
|
310 |
text_button.click(query, inputs=[prompt, negative_prompt, task, steps, sampler, cfg_scale, seed, width, height], outputs=image_output, concurrency_limit=48)
|
311 |
clear_prompt =gr.Button("Clear 🗑️",variant="primary", elem_id="clear_button")
|
|
|
316 |
img2img_b.click(mirror, inputs=[image_output, scale_by, method, gfpgan, codeformer], outputs=image_i2i, concurrency_limit=48)
|
317 |
|
318 |
|
319 |
+
app.queue(default_concurrency_limit=200, max_size=200) # <-- Sets up a queue with default parameters
|
320 |
if __name__ == "__main__":
|
321 |
app.launch()
|