Spaces:
Build error
Build error
owaiskha9654
commited on
Commit
•
72cb607
1
Parent(s):
eaa6868
Update app.py
Browse files
app.py
CHANGED
@@ -8,8 +8,9 @@ REPO_ID = "owaiskha9654/Yolov7_Custom_Object_Detection"
|
|
8 |
FILENAME = "best.pt"
|
9 |
print(os.getcwd())
|
10 |
yolov7_weights = hf_hub_download(repo_id=REPO_ID, filename=FILENAME)
|
11 |
-
model = torch.hub.load('
|
12 |
-
print(l_files)
|
|
|
13 |
|
14 |
def object_detection(im, size=416):
|
15 |
results = model(im) # inference
|
|
|
8 |
FILENAME = "best.pt"
|
9 |
print(os.getcwd())
|
10 |
yolov7_weights = hf_hub_download(repo_id=REPO_ID, filename=FILENAME)
|
11 |
+
model = torch.hub.load('WongKinYiu/yolov7', 'custom', path=yolov7_weights, force_reload=True) # local repo
|
12 |
+
#print(l_files)
|
13 |
+
|
14 |
|
15 |
def object_detection(im, size=416):
|
16 |
results = model(im) # inference
|