From 3b960afa83975acf8e15a6850fbeb4a6e393bd4d Mon Sep 17 00:00:00 2001 From: zhouchengrong Date: Wed, 3 Apr 2024 15:27:15 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BB=A3=E7=A0=81=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/api/api_outfit_matcher.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/api/api_outfit_matcher.py b/app/api/api_outfit_matcher.py index 6a3c88b..2079bcb 100644 --- a/app/api/api_outfit_matcher.py +++ b/app/api/api_outfit_matcher.py @@ -47,7 +47,7 @@ def outfit_matcher(request_item: OutfitMatcher): outfits = fashion_dataset.generate_outfit(item, request_item["topk"], request_item["max_outfits"]) except ValueError as e: logger.warning(e) - return {"message": f"valueError : {e}", "data": e} + return {"code": 500, "message": f"valueError : {e}", "data": e} scores = service.get_result(outfits, prepared_feature) @@ -62,7 +62,7 @@ def outfit_matcher(request_item: OutfitMatcher): ) result.append({"outfits": bad_outfits, "scores": bad_scores}) logger.info(f"run time is : {time.time() - start_time}") - return {"message": "ok", "data": result} + return {"code": 200, "message": "ok", "data": result} # except Exception as e: # logger.warning(e) # return {"message": f"{e}", "data": e}