Spaces:
Runtime error
Runtime error
Commit
•
0384003
1
Parent(s):
d9c4741
Update app.py
Browse files
app.py
CHANGED
@@ -9,7 +9,7 @@ FILENAME = "best.pt"
|
|
9 |
|
10 |
yolov7_custom_weights = hf_hub_download(repo_id=REPO_ID, filename=FILENAME)
|
11 |
|
12 |
-
model = torch.hub.load('
|
13 |
def object_detection(im, size=416):
|
14 |
results = model(im)
|
15 |
results.render()
|
|
|
9 |
|
10 |
yolov7_custom_weights = hf_hub_download(repo_id=REPO_ID, filename=FILENAME)
|
11 |
|
12 |
+
model = torch.hub.load('WongKinYiu/yolov7:main',model='custom', path_or_model=yolov7_custom_weights, force_reload=True)
|
13 |
def object_detection(im, size=416):
|
14 |
results = model(im)
|
15 |
results.render()
|