MlBOX: added logging statment to MLBOX to debug time

This commit is contained in:
2025-10-24 17:33:51 +02:00
parent 8893a109dd
commit 68fafa6b4e
+4
View File
@@ -5,6 +5,9 @@ import cv2
import requests
from ultralytics import YOLO
from aaredaqlib.logger_config import setup_logger
logger=setup_logger(__name__, '/tmp/mxlogs')
class MlBox:
# # def __init__(self, model_path: str = "best_v8_18092025.pt"):
@@ -25,6 +28,7 @@ class MlBox:
raise RuntimeError("Failed to encode image")
files={"file": ("image.jpg", buf.tobytes(), "image/jpeg")}
response = requests.post(self.__url, files=files)
logger.debug(response.text)
return response.json()
@staticmethod