Spaces:
Runtime error
Runtime error
KaraAgroAI
commited on
Commit
•
5597ce6
1
Parent(s):
8b8ad4e
Update app.py
Browse files
app.py
CHANGED
@@ -10,12 +10,13 @@ from PIL import Image
|
|
10 |
import torch
|
11 |
import ultralytics
|
12 |
|
13 |
-
model = torch.hub.load("ultralytics/yolov5", "custom", path="yolov5_0.65map_exp7_best.pt",
|
14 |
force_reload=False)
|
15 |
|
16 |
model.conf = 0.20 # NMS confidence threshold
|
17 |
|
18 |
-
|
|
|
19 |
|
20 |
def show_preds_image(im):
|
21 |
|
|
|
10 |
import torch
|
11 |
import ultralytics
|
12 |
|
13 |
+
model = torch.hub.load("ultralytics/yolov5", "custom", path="model/yolov5_0.65map_exp7_best.pt",
|
14 |
force_reload=False)
|
15 |
|
16 |
model.conf = 0.20 # NMS confidence threshold
|
17 |
|
18 |
+
# sample test images
|
19 |
+
path = [['sample-images/27.jpg', 'sample-images/82.jpg', 'sample-images/91.jpg']]
|
20 |
|
21 |
def show_preds_image(im):
|
22 |
|