Spaces:
Sleeping
Sleeping
unfinity
commited on
Commit
·
0eeb953
1
Parent(s):
302a728
port 7860
Browse files- Dockerfile +2 -2
- api.py +2 -2
Dockerfile
CHANGED
@@ -21,5 +21,5 @@ RUN wget https://github.com/ultralytics/assets/releases/download/v8.2.0/yolov8l-
|
|
21 |
COPY . /app
|
22 |
|
23 |
USER root
|
24 |
-
EXPOSE
|
25 |
-
CMD uvicorn api:app --port
|
|
|
21 |
COPY . /app
|
22 |
|
23 |
USER root
|
24 |
+
EXPOSE 7860
|
25 |
+
CMD uvicorn api:app --port 7860 --host 0.0.0.0
|
api.py
CHANGED
@@ -19,7 +19,7 @@ model_pose.to(device)
|
|
19 |
app = FastAPI()
|
20 |
|
21 |
|
22 |
-
@app.get("/
|
23 |
async def health():
|
24 |
return JSONResponse(content={"status": "ok"})
|
25 |
|
@@ -60,4 +60,4 @@ async def predict_image(file: UploadFile = File(...)):
|
|
60 |
|
61 |
if __name__ == "__main__":
|
62 |
import uvicorn
|
63 |
-
uvicorn.run(app, host="0.0.0.0", port=
|
|
|
19 |
app = FastAPI()
|
20 |
|
21 |
|
22 |
+
@app.get("/")
|
23 |
async def health():
|
24 |
return JSONResponse(content={"status": "ok"})
|
25 |
|
|
|
60 |
|
61 |
if __name__ == "__main__":
|
62 |
import uvicorn
|
63 |
+
uvicorn.run(app, host="0.0.0.0", port=7860)
|