MlBOX: added logging statment to MLBOX to debug time
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user