DAQ: Path to ML model is relative (to be fixed, as this won't work with pip anyway!)

This commit is contained in:
2025-05-30 09:47:11 +02:00
parent c3b64d7256
commit ee53eb3cd5
+4 -1
View File
@@ -1,9 +1,12 @@
from pathlib import Path
from typing import Tuple
from ultralytics import YOLO
class MlBox:
def __init__(self, model_path: str = "/home/leonarski_f/mxlibs3/src/aaredaq/best.pt"):
def __init__(self, model_path: str = "best.pt"):
model_path = str(Path(__file__).parent / model_path)
self.__model = YOLO(model_path)
@staticmethod