diff --git a/app.py b/app.py index 6ae0c59..9c31e4b 100644 --- a/app.py +++ b/app.py @@ -165,7 +165,7 @@ app.config["MAX_CONTENT_LENGTH"] = 200 * 1024 * 1024 # 200MB Upload-Limit # Globales Modell fuer den Video-Upload-Pfad (per Request). model = YOLO("yolo11s.pt") -names = model.model.names +names = model.names VEHICLE_CLASSES = {"car", "truck", "bus", "motorcycle"} ALLOWED_EXTENSIONS = {"mp4", "mov", "avi", "mkv"} @@ -554,7 +554,7 @@ class WebcamGrabber: def _ensure_model(self): if self.model is None: self.model = YOLO(WEBCAM_MODEL) - self.names = self.model.model.names + self.names = self.model.names def _publish(self, jpeg: bytes): with self.frame_cond: