Spaces:
Sleeping
Sleeping
Commit
•
0d50bd8
1
Parent(s):
e8a860c
Update app.py
Browse files
app.py
CHANGED
@@ -60,7 +60,7 @@ def detect_modify(img0, model, conf=0.4, imgsz=640, conf_thres = 0.25, iou_thres
|
|
60 |
|
61 |
|
62 |
# Get names and colors
|
63 |
-
names = model.module.names if hasattr(model, '
|
64 |
colors = [[random.randint(0, 255) for _ in range(3)] for _ in names]
|
65 |
|
66 |
# Run inference
|
|
|
60 |
|
61 |
|
62 |
# Get names and colors
|
63 |
+
names = model.module.names if hasattr(model, 'models-20240613T085418Z-001') else model.names
|
64 |
colors = [[random.randint(0, 255) for _ in range(3)] for _ in names]
|
65 |
|
66 |
# Run inference
|