Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -9,7 +9,7 @@ import os
|
|
9 |
def load_model(repo_id):
|
10 |
download_dir = snapshot_download(repo_id)
|
11 |
print(download_dir)
|
12 |
-
path = os.path.join(download_dir, "
|
13 |
print(path)
|
14 |
detection_model = YOLO(path, task='detect')
|
15 |
return detection_model
|
@@ -27,7 +27,7 @@ def predict(pilimg):
|
|
27 |
return out_pilimg
|
28 |
|
29 |
|
30 |
-
REPO_ID = "
|
31 |
detection_model = load_model(REPO_ID)
|
32 |
|
33 |
gr.Interface(fn=predict,
|
|
|
9 |
def load_model(repo_id):
|
10 |
download_dir = snapshot_download(repo_id)
|
11 |
print(download_dir)
|
12 |
+
path = os.path.join(download_dir, "best_openvino_model")
|
13 |
print(path)
|
14 |
detection_model = YOLO(path, task='detect')
|
15 |
return detection_model
|
|
|
27 |
return out_pilimg
|
28 |
|
29 |
|
30 |
+
REPO_ID = "wooalex/dogs_yolov8"
|
31 |
detection_model = load_model(REPO_ID)
|
32 |
|
33 |
gr.Interface(fn=predict,
|