From 0c25bb21ea506c92aad36f0d2fb4125098e42880 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rapha=C3=ABl=20Bournhonesque?= Date: Wed, 15 May 2024 17:02:47 +0200 Subject: [PATCH] fix: fix mypy issue --- robotoff/app/api.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/robotoff/app/api.py b/robotoff/app/api.py index 8c187a5b83..11e27bb479 100644 --- a/robotoff/app/api.py +++ b/robotoff/app/api.py @@ -895,7 +895,8 @@ def on_get(self, req: falcon.Request, resp: falcon.Response): result = model.detect_from_image(image, output_image=output_image) if output_image: - image_response(result.boxed_image, resp) + boxed_image = cast(Image.Image, result.boxed_image) + image_response(boxed_image, resp) return else: predictions[model_name] = result.to_json()