Guru-25 commited on
Commit
6b22c31
·
verified ·
1 Parent(s): 14b9b6f
Files changed (1) hide show
  1. app.py +3 -1
app.py CHANGED
@@ -40,11 +40,13 @@ DISTRACTION_MODEL_PATH = "best.pt"
40
 
41
  # --- Global Initializations ---
42
  # Load models on CPU initially
43
- gaze_predictor = GazePredictor(GAZE_MODEL_PATH, device='cpu') # Assuming GazePredictor accepts device arg
44
  blink_detector = BlinkDetector()
45
 
46
  # Load Distraction Model on CPU initially
47
  distraction_model = YOLO(DISTRACTION_MODEL_PATH)
 
 
48
 
49
  # Distraction Class Names
50
  distraction_class_names = [
 
40
 
41
  # --- Global Initializations ---
42
  # Load models on CPU initially
43
+ gaze_predictor = GazePredictor(GAZE_MODEL_PATH)
44
  blink_detector = BlinkDetector()
45
 
46
  # Load Distraction Model on CPU initially
47
  distraction_model = YOLO(DISTRACTION_MODEL_PATH)
48
+ distraction_model.to('cpu')
49
+
50
 
51
  # Distraction Class Names
52
  distraction_class_names = [