Spaces:
Sleeping
Sleeping
Janne Mäyrä
commited on
update model paths again
Browse files
app.py
CHANGED
@@ -18,20 +18,20 @@ def run_models(
|
|
18 |
conf_thr:gr.Slider=0.25
|
19 |
):
|
20 |
|
21 |
-
hp_model = f'{model_paths[model_type]}_hp/
|
22 |
model = YOLO(hp_model)
|
23 |
model.to(device='cpu')
|
24 |
hp_result = model(im[:,:,::-1], conf=conf_thr)
|
25 |
hp_im = hp_result[0].plot()
|
26 |
|
27 |
-
spk_model = f'{model_paths[model_type]}_spk/
|
28 |
model = YOLO(spk_model)
|
29 |
model.to(device='cpu')
|
30 |
|
31 |
spk_result = model(im[:,:,::-1], conf=conf_thr)
|
32 |
spk_im = spk_result[0].plot()
|
33 |
|
34 |
-
both_model = f'{model_paths[model_type]}_both/
|
35 |
model = YOLO(both_model)
|
36 |
model.to(device='cpu')
|
37 |
|
|
|
18 |
conf_thr:gr.Slider=0.25
|
19 |
):
|
20 |
|
21 |
+
hp_model = f'{model_paths[model_type]}_hp/best.pt'
|
22 |
model = YOLO(hp_model)
|
23 |
model.to(device='cpu')
|
24 |
hp_result = model(im[:,:,::-1], conf=conf_thr)
|
25 |
hp_im = hp_result[0].plot()
|
26 |
|
27 |
+
spk_model = f'{model_paths[model_type]}_spk/best.pt'
|
28 |
model = YOLO(spk_model)
|
29 |
model.to(device='cpu')
|
30 |
|
31 |
spk_result = model(im[:,:,::-1], conf=conf_thr)
|
32 |
spk_im = spk_result[0].plot()
|
33 |
|
34 |
+
both_model = f'{model_paths[model_type]}_both/best.pt'
|
35 |
model = YOLO(both_model)
|
36 |
model.to(device='cpu')
|
37 |
|