Spaces:
Sleeping
Sleeping
Commit
·
b6594b9
1
Parent(s):
63b33e8
Update app.py
Browse files
app.py
CHANGED
@@ -29,8 +29,6 @@ annotatormask=sv.MaskAnnotator()
|
|
29 |
|
30 |
def yolov8_inference(
|
31 |
image: gr.inputs.Image = None,
|
32 |
-
model_name: gr.inputs.Dropdown = None,
|
33 |
-
image_size: gr.inputs.Slider = 640,
|
34 |
conf_threshold: gr.inputs.Slider = 0.25,
|
35 |
iou_threshold: gr.inputs.Slider = 0.45,
|
36 |
):
|
@@ -38,7 +36,6 @@ def yolov8_inference(
|
|
38 |
|
39 |
image=image[:, :, ::-1].astype(np.uint8)
|
40 |
model = YOLO("https://huggingface.co/spaces/devisionx/Fourth_demo/blob/main/best.pt")
|
41 |
-
|
42 |
results = model(image,imgsz=640)[0]
|
43 |
image=image[:, :, ::-1].astype(np.uint8)
|
44 |
detections = sv.Detections.from_yolov8(results)
|
|
|
29 |
|
30 |
def yolov8_inference(
|
31 |
image: gr.inputs.Image = None,
|
|
|
|
|
32 |
conf_threshold: gr.inputs.Slider = 0.25,
|
33 |
iou_threshold: gr.inputs.Slider = 0.45,
|
34 |
):
|
|
|
36 |
|
37 |
image=image[:, :, ::-1].astype(np.uint8)
|
38 |
model = YOLO("https://huggingface.co/spaces/devisionx/Fourth_demo/blob/main/best.pt")
|
|
|
39 |
results = model(image,imgsz=640)[0]
|
40 |
image=image[:, :, ::-1].astype(np.uint8)
|
41 |
detections = sv.Detections.from_yolov8(results)
|