fcakyon commited on
Commit
6675859
1 Parent(s): ac75378

update to new sahi api

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -1,6 +1,6 @@
1
  import gradio as gr
2
  import sahi.utils
3
- import sahi.model
4
  import sahi.predict
5
  import sahi.slicing
6
  from PIL import Image
@@ -30,8 +30,8 @@ sahi.utils.file.download_from_url(
30
 
31
 
32
  # Model
33
- model = sahi.model.Yolov5DetectionModel(
34
- model_path="yolov5s6.pt", device="cpu", confidence_threshold=0.5, image_size=IMAGE_SIZE
35
  )
36
 
37
 
 
1
  import gradio as gr
2
  import sahi.utils
3
+ import sahi import AutoDetectionModel
4
  import sahi.predict
5
  import sahi.slicing
6
  from PIL import Image
 
30
 
31
 
32
  # Model
33
+ model = AutoDetectionModel(
34
+ model_type="yolov5", model_path="yolov5s6.pt", device="cpu", confidence_threshold=0.5, image_size=IMAGE_SIZE
35
  )
36
 
37