Upload app.py
Browse files
app.py
CHANGED
|
@@ -1063,7 +1063,7 @@ def create_app():
|
|
| 1063 |
gr.Markdown("### 🖼️ Generated Image")
|
| 1064 |
image_output = gr.Image(
|
| 1065 |
label="",
|
| 1066 |
-
|
| 1067 |
height=600,
|
| 1068 |
type="pil"
|
| 1069 |
)
|
|
@@ -1338,14 +1338,14 @@ def find_available_port(start_port=7860, max_attempts=10):
|
|
| 1338 |
if __name__ == "__main__":
|
| 1339 |
app = create_app()
|
| 1340 |
# Hugging Face Spaces handles port automatically
|
| 1341 |
-
#
|
| 1342 |
port = os.getenv("GRADIO_SERVER_PORT")
|
| 1343 |
if port:
|
| 1344 |
try:
|
| 1345 |
port = int(port)
|
| 1346 |
-
app.launch(server_name="0.0.0.0", server_port=port, share=False)
|
| 1347 |
except ValueError:
|
| 1348 |
-
app.launch(server_name="0.0.0.0", share=False)
|
| 1349 |
else:
|
| 1350 |
# Hugging Face Spaces - let Gradio handle everything automatically
|
| 1351 |
-
app.launch()
|
|
|
|
| 1063 |
gr.Markdown("### 🖼️ Generated Image")
|
| 1064 |
image_output = gr.Image(
|
| 1065 |
label="",
|
| 1066 |
+
show_label=False,
|
| 1067 |
height=600,
|
| 1068 |
type="pil"
|
| 1069 |
)
|
|
|
|
| 1338 |
if __name__ == "__main__":
|
| 1339 |
app = create_app()
|
| 1340 |
# Hugging Face Spaces handles port automatically
|
| 1341 |
+
# Disable SSR to avoid Node.js server issues
|
| 1342 |
port = os.getenv("GRADIO_SERVER_PORT")
|
| 1343 |
if port:
|
| 1344 |
try:
|
| 1345 |
port = int(port)
|
| 1346 |
+
app.launch(server_name="0.0.0.0", server_port=port, share=False, ssr_mode=False)
|
| 1347 |
except ValueError:
|
| 1348 |
+
app.launch(server_name="0.0.0.0", share=False, ssr_mode=False)
|
| 1349 |
else:
|
| 1350 |
# Hugging Face Spaces - let Gradio handle everything automatically
|
| 1351 |
+
app.launch(ssr_mode=False)
|