Spaces:
Runtime error
Runtime error
update app.py
Browse files
app.py
CHANGED
@@ -4,11 +4,13 @@ import tempfile
|
|
4 |
import gradio as gr
|
5 |
from ultralytics import YOLO
|
6 |
from ultralytics.nn.tasks import DetectionModel
|
|
|
7 |
|
8 |
-
# Add
|
9 |
torch.serialization.add_safe_globals([
|
10 |
DetectionModel,
|
11 |
-
torch.nn.modules.container.Sequential
|
|
|
12 |
])
|
13 |
|
14 |
# Load the YOLO model
|
|
|
4 |
import gradio as gr
|
5 |
from ultralytics import YOLO
|
6 |
from ultralytics.nn.tasks import DetectionModel
|
7 |
+
from ultralytics.nn.modules.conv import Conv
|
8 |
|
9 |
+
# Add all the classes we've seen so far to the safe globals list
|
10 |
torch.serialization.add_safe_globals([
|
11 |
DetectionModel,
|
12 |
+
torch.nn.modules.container.Sequential,
|
13 |
+
Conv
|
14 |
])
|
15 |
|
16 |
# Load the YOLO model
|