Spaces:
Runtime error
Runtime error
update to new sahi api
Browse files
app.py
CHANGED
@@ -1,6 +1,6 @@
|
|
1 |
import gradio as gr
|
2 |
import sahi.utils
|
3 |
-
import sahi
|
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 =
|
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 |
|