Spaces:
Sleeping
Sleeping
Syntax error in the file! There's a typo on line 148
Browse files
app.py
CHANGED
|
@@ -145,4 +145,13 @@ async def search_medqa(request: SearchRequest):
|
|
| 145 |
"distance": results['distances'][0][i] if 'distances' in results else None
|
| 146 |
})
|
| 147 |
|
| 148 |
-
return
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 145 |
"distance": results['distances'][0][i] if 'distances' in results else None
|
| 146 |
})
|
| 147 |
|
| 148 |
+
return SearchResponse(results=formatted_results)
|
| 149 |
+
except Exception as e:
|
| 150 |
+
raise HTTPException(status_code=500, detail=str(e))
|
| 151 |
+
|
| 152 |
+
@app.get("/health")
|
| 153 |
+
async def health():
|
| 154 |
+
return {"status": "healthy", "items": collection.count()}
|
| 155 |
+
|
| 156 |
+
# Mount Gradio on FastAPI
|
| 157 |
+
app = gr.mount_gradio_app(app, demo, path="/")
|