Spaces:
Sleeping
Sleeping
Update app_hf.py
Browse files
app_hf.py
CHANGED
|
@@ -1,31 +1,23 @@
|
|
| 1 |
-
"""
|
| 2 |
-
Hugging Face Spaces Deployment Entry Point
|
| 3 |
-
Lightweight dashboard entry point without heavy dependencies
|
| 4 |
-
"""
|
| 5 |
-
import os
|
| 6 |
-
import sys
|
| 7 |
-
|
| 8 |
-
# Set up environment
|
| 9 |
-
os.environ['GRADIO_SERVER_NAME'] = '0.0.0.0'
|
| 10 |
-
os.environ['GRADIO_SERVER_PORT'] = '7860'
|
| 11 |
-
|
| 12 |
-
|
| 13 |
-
|
| 14 |
-
|
| 15 |
-
|
| 16 |
-
|
| 17 |
-
|
| 18 |
-
|
| 19 |
-
|
| 20 |
-
|
| 21 |
-
|
| 22 |
-
|
| 23 |
-
|
| 24 |
-
)
|
| 25 |
-
except Exception as e:
|
| 26 |
-
# Fall back to simple HTTP server
|
| 27 |
-
print(f"Gradio not available, using simple server: {e}")
|
| 28 |
-
from dashboard_simple import start_simple_server
|
| 29 |
-
|
| 30 |
-
if __name__ == "__main__":
|
| 31 |
-
start_simple_server()
|
|
|
|
| 1 |
+
"""
|
| 2 |
+
Hugging Face Spaces Deployment Entry Point
|
| 3 |
+
Lightweight dashboard entry point without heavy dependencies
|
| 4 |
+
"""
|
| 5 |
+
import os
|
| 6 |
+
import sys
|
| 7 |
+
|
| 8 |
+
# Set up environment
|
| 9 |
+
os.environ['GRADIO_SERVER_NAME'] = '0.0.0.0'
|
| 10 |
+
os.environ['GRADIO_SERVER_PORT'] = '7860'
|
| 11 |
+
|
| 12 |
+
|
| 13 |
+
# Import and run the dashboard
|
| 14 |
+
from dashboard_simple import start_simple_server
|
| 15 |
+
|
| 16 |
+
if __name__ == "__main__":
|
| 17 |
+
start_simple_server()
|
| 18 |
+
# Try Gradio first, fall back to simple server
|
| 19 |
+
|
| 20 |
+
from dashboard_simple import start_simple_server
|
| 21 |
+
|
| 22 |
+
if __name__ == "__main__":
|
| 23 |
+
start_simple_server()
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|