Spaces:
Runtime error
Runtime error
Michael S. Trusov commited on
Commit ·
0e0818a
1
Parent(s): 15f8360
July 18 commit to Hugging Face 4:45pm
Browse files
app.py
CHANGED
|
@@ -35,12 +35,15 @@ def download_file(filename: str, directory: str = "."):
|
|
| 35 |
def run_fastapi():
|
| 36 |
import uvicorn
|
| 37 |
print("Starting FastAPI server...")
|
| 38 |
-
|
| 39 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 40 |
|
| 41 |
#--------------------------------------------------------------------------------
|
| 42 |
|
| 43 |
-
|
| 44 |
qs = {}
|
| 45 |
|
| 46 |
theme = gr.themes.Base(
|
|
|
|
| 35 |
def run_fastapi():
|
| 36 |
import uvicorn
|
| 37 |
print("Starting FastAPI server...")
|
| 38 |
+
|
| 39 |
+
try:
|
| 40 |
+
uvicorn.run(app, host="0.0.0.0", port=8000)
|
| 41 |
+
print("FastAPI server started on port 8000")
|
| 42 |
+
except Exception as e:
|
| 43 |
+
print(f"Failed to start FastAPI server: {e}")
|
| 44 |
|
| 45 |
#--------------------------------------------------------------------------------
|
| 46 |
|
|
|
|
| 47 |
qs = {}
|
| 48 |
|
| 49 |
theme = gr.themes.Base(
|