Spaces:
Sleeping
Sleeping
Janne Mäyrä
commited on
update model paths
Browse files
app.py
CHANGED
@@ -5,11 +5,11 @@ import os
|
|
5 |
from pathlib import Path
|
6 |
|
7 |
model_paths = {
|
8 |
-
'YOLOv8n': '/
|
9 |
-
'YOLOv8s': '/
|
10 |
-
'YOLOv8m': '/
|
11 |
-
'YOLOv8l': '/
|
12 |
-
'YOLOv8x': '/
|
13 |
}
|
14 |
|
15 |
def run_models(
|
@@ -60,8 +60,9 @@ with gr.Blocks() as demo:
|
|
60 |
inp = gr.Image(label='Input image', sources='upload')
|
61 |
with gr.Column(1):
|
62 |
ex_list = [[ex_dir/i, i.split('_')[0]] for i in os.listdir(ex_dir)]
|
63 |
-
ex = gr.Examples(ex_list, inputs=[inp, loc],
|
64 |
-
cache_examples=False, examples_per_page=5
|
|
|
65 |
with gr.Column(1):
|
66 |
loc.render()
|
67 |
model = gr.Dropdown([
|
|
|
5 |
from pathlib import Path
|
6 |
|
7 |
model_paths = {
|
8 |
+
'YOLOv8n': 'https://huggingface.co/mayrajeo/yolov8-deadwood/resolve/main/yolov8n_Adam',
|
9 |
+
'YOLOv8s': 'https://huggingface.co/mayrajeo/yolov8-deadwood/resolve/main/yolov8s_Adam',
|
10 |
+
'YOLOv8m': 'https://huggingface.co/mayrajeo/yolov8-deadwood/resolve/main/yolov8m_Adam',
|
11 |
+
'YOLOv8l': 'https://huggingface.co/mayrajeo/yolov8-deadwood/resolve/main/yolov8l_Adam',
|
12 |
+
'YOLOv8x': 'https://huggingface.co/mayrajeo/yolov8-deadwood/resolve/main/yolov8x_Adam',
|
13 |
}
|
14 |
|
15 |
def run_models(
|
|
|
60 |
inp = gr.Image(label='Input image', sources='upload')
|
61 |
with gr.Column(1):
|
62 |
ex_list = [[ex_dir/i, i.split('_')[0]] for i in os.listdir(ex_dir)]
|
63 |
+
ex = gr.Examples(ex_list, inputs=[inp, loc],
|
64 |
+
cache_examples=False, examples_per_page=5,
|
65 |
+
label='Example UAV images')
|
66 |
with gr.Column(1):
|
67 |
loc.render()
|
68 |
model = gr.Dropdown([
|