fix: Restqdrant
Browse files- Dockerfile +1 -1
- app.py +5 -0
Dockerfile
CHANGED
|
@@ -48,4 +48,4 @@ EXPOSE 8000
|
|
| 48 |
# CMD curl -f http://localhost:8000/v1 || exit 1
|
| 49 |
|
| 50 |
# Run the application
|
| 51 |
-
CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "
|
|
|
|
| 48 |
# CMD curl -f http://localhost:8000/v1 || exit 1
|
| 49 |
|
| 50 |
# Run the application
|
| 51 |
+
CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860", "--timeout-keep-alive", "0"]
|
app.py
CHANGED
|
@@ -29,6 +29,11 @@ def health_check():
|
|
| 29 |
"service": "PAN-SEA Travel Planning API"
|
| 30 |
}
|
| 31 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 32 |
@app.get("/v1")
|
| 33 |
def greet_json():
|
| 34 |
start_time = time.time()
|
|
|
|
| 29 |
"service": "PAN-SEA Travel Planning API"
|
| 30 |
}
|
| 31 |
|
| 32 |
+
@app.get("/ready")
|
| 33 |
+
def ready_check():
|
| 34 |
+
"""Simple ready check for Hugging Face"""
|
| 35 |
+
return {"ready": True, "status": "ok"}
|
| 36 |
+
|
| 37 |
@app.get("/v1")
|
| 38 |
def greet_json():
|
| 39 |
start_time = time.time()
|