Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -5,7 +5,7 @@ from PIL import Image
|
|
5 |
|
6 |
yolov7_weights = hf_hub_download(repo_id="LailaMB/visual_pollution_detection", filename="best_640_rpoch56.pt")
|
7 |
|
8 |
-
model = torch.hub.load('WongKinYiu/yolov7:main', 'custom',
|
9 |
|
10 |
def object_detection(im, size=640):
|
11 |
results = model(im) # inference
|
|
|
5 |
|
6 |
yolov7_weights = hf_hub_download(repo_id="LailaMB/visual_pollution_detection", filename="best_640_rpoch56.pt")
|
7 |
|
8 |
+
model = torch.hub.load('WongKinYiu/yolov7:main', 'custom', yolov7_weights, force_reload=True) # local repo
|
9 |
|
10 |
def object_detection(im, size=640):
|
11 |
results = model(im) # inference
|