Spaces:
Sleeping
Sleeping
Update firedetection.py
Browse files- 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 |
-
|
|
|
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.
|