Spaces:
Runtime error
Runtime error
Commit
·
120ebbd
1
Parent(s):
10074f9
changed to uvicorn setup for HF v7
Browse files- main/main.py +5 -0
main/main.py
CHANGED
|
@@ -69,6 +69,11 @@ def create_app():
|
|
| 69 |
# Set the response queue ID for the app
|
| 70 |
app.response_queue_id = 0 # Since we're using a single worker
|
| 71 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 72 |
return app
|
| 73 |
|
| 74 |
# Create the app instance for uvicorn
|
|
|
|
| 69 |
# Set the response queue ID for the app
|
| 70 |
app.response_queue_id = 0 # Since we're using a single worker
|
| 71 |
|
| 72 |
+
@app.on_event("startup")
|
| 73 |
+
async def startup_event():
|
| 74 |
+
"""Initialize router on startup"""
|
| 75 |
+
await init_router(api)
|
| 76 |
+
|
| 77 |
return app
|
| 78 |
|
| 79 |
# Create the app instance for uvicorn
|