From af3c7c2e51fedbe2639c33fdd70a7e0f629119e8 Mon Sep 17 00:00:00 2001 From: zhouchengrong Date: Wed, 14 Aug 2024 17:24:03 +0800 Subject: [PATCH] =?UTF-8?q?feat=20=20=20sketch=20=E6=8F=90=E5=8F=96?= =?UTF-8?q?=E6=8E=A5=E5=8F=A3=20fix?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/api/api_image2sketch.py | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/app/api/api_image2sketch.py b/app/api/api_image2sketch.py index 98d94ee..414361d 100644 --- a/app/api/api_image2sketch.py +++ b/app/api/api_image2sketch.py @@ -26,11 +26,11 @@ def image2sketch(request_item: Image2SketchModel): "sketch_name": "12341556-89.jpg" } """ - # try: - logger.info(f"image2sketch request item is : @@@@@@:{json.dumps(request_item.dict())}") - service = Image2SketchServer(request_item) - sketch_url = service.get_result() - # except Exception as e: - # logger.warning(f"image2sketch Run Exception @@@@@@:{e}") - # raise HTTPException(status_code=404, detail=str(e)) + try: + logger.info(f"image2sketch request item is : @@@@@@:{json.dumps(request_item.dict())}") + service = Image2SketchServer(request_item) + sketch_url = service.get_result() + except Exception as e: + logger.warning(f"image2sketch Run Exception @@@@@@:{e}") + raise HTTPException(status_code=404, detail=str(e)) return ResponseModel(data=sketch_url)