Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -3,11 +3,11 @@ import gradio as gr
|
|
3 |
from huggingface_hub import hf_hub_download
|
4 |
from PIL import Image
|
5 |
|
6 |
-
REPO_ID = "
|
7 |
FILENAME = "models/best_640_rpoch56.pt"
|
8 |
|
9 |
yolov7_weights = hf_hub_download(repo_id=REPO_ID, filename=FILENAME)
|
10 |
-
|
11 |
model = torch.hub.load('WongKinYiu/yolov7:main', 'custom', path=yolov7_weights, force_reload=True) # local repo
|
12 |
|
13 |
def object_detection(im, size=640):
|
|
|
3 |
from huggingface_hub import hf_hub_download
|
4 |
from PIL import Image
|
5 |
|
6 |
+
REPO_ID = "Yolov7/yolov7"
|
7 |
FILENAME = "models/best_640_rpoch56.pt"
|
8 |
|
9 |
yolov7_weights = hf_hub_download(repo_id=REPO_ID, filename=FILENAME)
|
10 |
+
|
11 |
model = torch.hub.load('WongKinYiu/yolov7:main', 'custom', path=yolov7_weights, force_reload=True) # local repo
|
12 |
|
13 |
def object_detection(im, size=640):
|