Spaces:
Sleeping
Sleeping
Commit
·
1e3a43d
1
Parent(s):
1ef8aba
Cors
Browse files- inference.py +3 -0
inference.py
CHANGED
@@ -61,6 +61,7 @@ async def startup_event():
|
|
61 |
asyncio.create_task(send_conversation_updates())
|
62 |
|
63 |
@app.get("/health")
|
|
|
64 |
async def health_check():
|
65 |
"""Health check endpoint"""
|
66 |
return {
|
@@ -100,11 +101,13 @@ async def ws_inference(ws: WebSocket):
|
|
100 |
logger.info(f"WebSocket connection closed. Remaining connections: {len(active_connections)}")
|
101 |
|
102 |
@app.get("/conversation")
|
|
|
103 |
async def get_conversation():
|
104 |
"""Get the current conversation as HTML"""
|
105 |
return {"conversation": diart.get_formatted_conversation()}
|
106 |
|
107 |
@app.get("/status")
|
|
|
108 |
async def get_status():
|
109 |
"""Get system status information"""
|
110 |
return {"status": diart.get_status_info()}
|
|
|
61 |
asyncio.create_task(send_conversation_updates())
|
62 |
|
63 |
@app.get("/health")
|
64 |
+
@app.head("/health")
|
65 |
async def health_check():
|
66 |
"""Health check endpoint"""
|
67 |
return {
|
|
|
101 |
logger.info(f"WebSocket connection closed. Remaining connections: {len(active_connections)}")
|
102 |
|
103 |
@app.get("/conversation")
|
104 |
+
@app.head("/conversation")
|
105 |
async def get_conversation():
|
106 |
"""Get the current conversation as HTML"""
|
107 |
return {"conversation": diart.get_formatted_conversation()}
|
108 |
|
109 |
@app.get("/status")
|
110 |
+
@app.head("/status")
|
111 |
async def get_status():
|
112 |
"""Get system status information"""
|
113 |
return {"status": diart.get_status_info()}
|