From be691ce04ba35832a3ff7cd2de645490556d5e3c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EA=B9=80=EC=A7=84=ED=98=84?= Date: Fri, 4 Oct 2024 15:53:34 +0900 Subject: [PATCH] =?UTF-8?q?Fix:=20=EB=AA=A8=EB=8D=B8=20=EB=8B=A4=EC=9A=B4?= =?UTF-8?q?=EB=A1=9C=EB=93=9C=20path=20=EC=98=A4=EB=A5=98=20=EC=88=98?= =?UTF-8?q?=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ai/app/api/yolo/model.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ai/app/api/yolo/model.py b/ai/app/api/yolo/model.py index f166819..9a50831 100644 --- a/ai/app/api/yolo/model.py +++ b/ai/app/api/yolo/model.py @@ -37,7 +37,7 @@ def create_model(project_id: int, request: ModelCreateRequest): @router.delete("/projects/{project_id}/models/{model_key}", status_code=204) def delete_model(project_id:int, model_key:str): - model_path = join_path("resources", "projects", project_id, "models", model_key) + model_path = join_path("resources", "projects", str(project_id), "models", model_key) try: delete_file(model_path) except FileNotFoundError: @@ -71,7 +71,7 @@ def upload_model(project_id:int, file: UploadFile = File(...)): @router.get("/download/projects/{project_id}/models/{model_key}") def download_model(project_id:int, model_key:str): - model_path = join_path("resources", "projects", project_id, "models", model_key) + model_path = join_path("resources", "projects", str(project_id), "models", model_key) try: filename = get_file_name(model_path) # 파일 응답 반환