Update app.py
Browse files
app.py
CHANGED
|
@@ -113,25 +113,25 @@ with gr.Blocks(title="Qwen Image Multi-Edit By Chalenger") as demo:
|
|
| 113 |
play_btn.click(
|
| 114 |
fn=generate_images,
|
| 115 |
inputs=[img1, img2, img3, prompt, nout, aspect_ratio_state],
|
| 116 |
-
outputs=gallery
|
| 117 |
-
queue=True
|
| 118 |
)
|
| 119 |
|
| 120 |
stop_btn.click(lambda: None, None, gallery)
|
| 121 |
|
| 122 |
|
| 123 |
# ============================
|
| 124 |
-
# LAUNCH
|
| 125 |
# ============================
|
| 126 |
|
| 127 |
if __name__ == "__main__":
|
| 128 |
try:
|
|
|
|
| 129 |
demo.launch(
|
| 130 |
server_name="0.0.0.0",
|
| 131 |
server_port=7860,
|
| 132 |
-
enable_queue=True,
|
| 133 |
debug=True
|
| 134 |
)
|
| 135 |
except Exception:
|
| 136 |
traceback.print_exc()
|
| 137 |
sys.exit(1)
|
|
|
|
|
|
| 113 |
play_btn.click(
|
| 114 |
fn=generate_images,
|
| 115 |
inputs=[img1, img2, img3, prompt, nout, aspect_ratio_state],
|
| 116 |
+
outputs=gallery
|
|
|
|
| 117 |
)
|
| 118 |
|
| 119 |
stop_btn.click(lambda: None, None, gallery)
|
| 120 |
|
| 121 |
|
| 122 |
# ============================
|
| 123 |
+
# LAUNCH COMPATÍVEL
|
| 124 |
# ============================
|
| 125 |
|
| 126 |
if __name__ == "__main__":
|
| 127 |
try:
|
| 128 |
+
demo.queue() # ativa fila sem depender do launch
|
| 129 |
demo.launch(
|
| 130 |
server_name="0.0.0.0",
|
| 131 |
server_port=7860,
|
|
|
|
| 132 |
debug=True
|
| 133 |
)
|
| 134 |
except Exception:
|
| 135 |
traceback.print_exc()
|
| 136 |
sys.exit(1)
|
| 137 |
+
|