notsakeeb commited on
Commit
7effb49
·
verified ·
1 Parent(s): 4d375fb

Update ToolSet.py

Browse files
Files changed (1) hide show
  1. ToolSet.py +4 -1
ToolSet.py CHANGED
@@ -255,7 +255,10 @@ Do NOT send commands that block indefinitely (e.g., `input()`).""",
255
  class YouTubeFrameExtractor:
256
  def __init__(self, model_path: str, frame_rate: int = 1):
257
  # Load YOLOv8 model
258
- model_path = os.getenv("YOLO_CONFIG_DIR")
 
 
 
259
  self.model = YOLO(model_path)
260
  self.frame_rate = frame_rate # frames per second to sample
261
 
 
255
  class YouTubeFrameExtractor:
256
  def __init__(self, model_path: str, frame_rate: int = 1):
257
  # Load YOLOv8 model
258
+ YOLO_PATH_CONFIG = Path("yolo")
259
+ YOLO_PATH_CONFIG.mkdir(exist_ok=True)
260
+ settings.update({"runs_dir": YOLO_PATH_CONFIG})
261
+ model_path = YOLO_PATH_CONFIG
262
  self.model = YOLO(model_path)
263
  self.frame_rate = frame_rate # frames per second to sample
264