Janne Mäyrä commited on
Commit
8202567
·
unverified ·
1 Parent(s): 86ecc5c

update model paths

Browse files
Files changed (1) hide show
  1. app.py +8 -7
app.py CHANGED
@@ -5,11 +5,11 @@ import os
5
  from pathlib import Path
6
 
7
  model_paths = {
8
- 'YOLOv8n': '/mnt/d/Users/E1005164/articles/deadwood-yolov8/codes/runs_pretrained/yolov8n_Adam',
9
- 'YOLOv8s': '/mnt/d/Users/E1005164/articles/deadwood-yolov8/codes/runs_pretrained/yolov8s_Adam',
10
- 'YOLOv8m': '/mnt/d/Users/E1005164/articles/deadwood-yolov8/codes/runs_pretrained/yolov8m_Adam',
11
- 'YOLOv8l': '/mnt/d/Users/E1005164/articles/deadwood-yolov8/codes/runs_pretrained/yolov8l_Adam',
12
- 'YOLOv8x': '/mnt/d/Users/E1005164/articles/deadwood-yolov8/codes/runs_pretrained/yolov8x_Adam',
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], label=None,
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([