bahakizil commited on
Commit
a59862a
·
verified ·
1 Parent(s): c8abe6a

Update firedetection.py

Browse files
Files changed (1) hide show
  1. firedetection.py +2 -1
firedetection.py CHANGED
@@ -8,7 +8,8 @@ def detect_fire_in_video(
8
  input_video_path: str,
9
  output_video_path: str,
10
  model_path: str,
11
- device: str = "cpu"
 
12
  ) -> str:
13
  """
14
  Detects fire in the given video using a YOLO model.
 
8
  input_video_path: str,
9
  output_video_path: str,
10
  model_path: str,
11
+ model.to('cuda' if torch.cuda.is_available() else 'cpu')
12
+
13
  ) -> str:
14
  """
15
  Detects fire in the given video using a YOLO model.