Spaces:
Runtime error
Runtime error
Commit
·
1f2bbae
1
Parent(s):
83db50b
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 = 360,
|
34 |
conf_threshold: gr.inputs.Slider = 0.25,
|
35 |
iou_threshold: gr.inputs.Slider = 0.45,
|
36 |
):
|
@@ -39,7 +37,6 @@ def yolov8_inference(
|
|
39 |
|
40 |
image=image[:, :, ::-1].astype(np.uint8)
|
41 |
model = YOLO("https://huggingface.co/spaces/devisionx/Fifth_demo/blob/main/best_weigh.pt")
|
42 |
-
|
43 |
results = model(image,imgsz=360)[0]
|
44 |
image=image[:, :, ::-1].astype(np.uint8)
|
45 |
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 |
):
|
|
|
37 |
|
38 |
image=image[:, :, ::-1].astype(np.uint8)
|
39 |
model = YOLO("https://huggingface.co/spaces/devisionx/Fifth_demo/blob/main/best_weigh.pt")
|
|
|
40 |
results = model(image,imgsz=360)[0]
|
41 |
image=image[:, :, ::-1].astype(np.uint8)
|
42 |
detections = sv.Detections.from_yolov8(results)
|