Shreekant Kalwar (Nokia)
commited on
Commit
·
b34ee0a
1
Parent(s):
9ce21c8
runtime.txt add
Browse files- Dockerfile +1 -1
- app.py +4 -0
Dockerfile
CHANGED
|
@@ -10,4 +10,4 @@ COPY --chown=user ./requirements.txt requirements.txt
|
|
| 10 |
RUN pip install --no-cache-dir --upgrade -r requirements.txt
|
| 11 |
|
| 12 |
COPY --chown=user . /app
|
| 13 |
-
CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "
|
|
|
|
| 10 |
RUN pip install --no-cache-dir --upgrade -r requirements.txt
|
| 11 |
|
| 12 |
COPY --chown=user . /app
|
| 13 |
+
CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]
|
app.py
CHANGED
|
@@ -21,6 +21,10 @@ app = FastAPI()
|
|
| 21 |
class ChatRequest(BaseModel):
|
| 22 |
message: str
|
| 23 |
|
|
|
|
|
|
|
|
|
|
|
|
|
| 24 |
@app.post("/chat")
|
| 25 |
def chat(request: ChatRequest):
|
| 26 |
"""Chat endpoint using DeepSeek model"""
|
|
|
|
| 21 |
class ChatRequest(BaseModel):
|
| 22 |
message: str
|
| 23 |
|
| 24 |
+
@app.get("/")
|
| 25 |
+
def root():
|
| 26 |
+
return {"status": "ok"}
|
| 27 |
+
|
| 28 |
@app.post("/chat")
|
| 29 |
def chat(request: ChatRequest):
|
| 30 |
"""Chat endpoint using DeepSeek model"""
|