Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -107,8 +107,9 @@ elif input_option == "Upload Video":
|
|
| 107 |
|
| 108 |
# Make predictions using your fire detection model
|
| 109 |
results = model.predict(source=frame, conf=0.5)
|
| 110 |
-
|
| 111 |
fire_detected = True
|
|
|
|
| 112 |
|
| 113 |
# Draw bounding boxes on the frame if fire is detected
|
| 114 |
for result in results:
|
|
|
|
| 107 |
|
| 108 |
# Make predictions using your fire detection model
|
| 109 |
results = model.predict(source=frame, conf=0.5)
|
| 110 |
+
if len(results) > 0 and len(results[0].boxes) > 0:
|
| 111 |
fire_detected = True
|
| 112 |
+
|
| 113 |
|
| 114 |
# Draw bounding boxes on the frame if fire is detected
|
| 115 |
for result in results:
|