Spaces:
Runtime error
Runtime error
Aguilar Elizondo commited on
Commit ·
a9eb483
1
Parent(s): 20f5f44
Downgrade to Gradio 4.44.1 and add explicit server config
Browse files- app.py +9 -2
- requirements.txt +1 -1
app.py
CHANGED
|
@@ -1,5 +1,5 @@
|
|
| 1 |
"""
|
| 2 |
-
Architecture AI Enhancer - Simple Gradio Interface for HF Spaces
|
| 3 |
"""
|
| 4 |
import gradio as gr
|
| 5 |
import torch
|
|
@@ -7,6 +7,7 @@ from PIL import Image
|
|
| 7 |
import logging
|
| 8 |
from pathlib import Path
|
| 9 |
import sys
|
|
|
|
| 10 |
|
| 11 |
# Add backend to path
|
| 12 |
sys.path.insert(0, str(Path(__file__).parent))
|
|
@@ -100,4 +101,10 @@ iface = gr.Interface(
|
|
| 100 |
)
|
| 101 |
|
| 102 |
if __name__ == "__main__":
|
| 103 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
"""
|
| 2 |
+
""" Architecture AI Enhancer - Simple Gradio Interface for HF Spaces
|
| 3 |
"""
|
| 4 |
import gradio as gr
|
| 5 |
import torch
|
|
|
|
| 7 |
import logging
|
| 8 |
from pathlib import Path
|
| 9 |
import sys
|
| 10 |
+
import os
|
| 11 |
|
| 12 |
# Add backend to path
|
| 13 |
sys.path.insert(0, str(Path(__file__).parent))
|
|
|
|
| 101 |
)
|
| 102 |
|
| 103 |
if __name__ == "__main__":
|
| 104 |
+
# HF Spaces requires explicit server configuration
|
| 105 |
+
iface.queue().launch(
|
| 106 |
+
server_name="0.0.0.0",
|
| 107 |
+
server_port=int(os.getenv("PORT", 7860)),
|
| 108 |
+
share=False,
|
| 109 |
+
show_error=True
|
| 110 |
+
)
|
requirements.txt
CHANGED
|
@@ -16,7 +16,7 @@ numpy>=1.24.0
|
|
| 16 |
basicsr>=1.4.2
|
| 17 |
|
| 18 |
# Gradio interface
|
| 19 |
-
gradio==
|
| 20 |
|
| 21 |
# Configuration
|
| 22 |
pydantic>=2.5.0
|
|
|
|
| 16 |
basicsr>=1.4.2
|
| 17 |
|
| 18 |
# Gradio interface
|
| 19 |
+
gradio==4.44.1
|
| 20 |
|
| 21 |
# Configuration
|
| 22 |
pydantic>=2.5.0
|