Spaces:
Runtime error
Runtime error
nehulagrawal
commited on
Commit
•
8241fcd
1
Parent(s):
3989dd0
Update app.py
Browse files
app.py
CHANGED
@@ -28,19 +28,8 @@ def yolov8_img_inference(
|
|
28 |
model_path: gr.inputs.Dropdown = None,
|
29 |
image_size: gr.inputs.Slider = 640,
|
30 |
conf_threshold: gr.inputs.Slider = 0.25,
|
31 |
-
iou_threshold: gr.inputs.Slider = 0.45
|
32 |
):
|
33 |
-
"""
|
34 |
-
YOLOv8 inference function
|
35 |
-
Args:
|
36 |
-
image: Input image
|
37 |
-
model_path: Path to the model
|
38 |
-
image_size: Image size
|
39 |
-
conf_threshold: Confidence threshold
|
40 |
-
iou_threshold: IOU threshold
|
41 |
-
Returns:
|
42 |
-
Rendered image
|
43 |
-
"""
|
44 |
model = YOLO(model_path)
|
45 |
model.overrides['conf'] = conf_threshold
|
46 |
model.overrides['iou']= iou_threshold
|
|
|
28 |
model_path: gr.inputs.Dropdown = None,
|
29 |
image_size: gr.inputs.Slider = 640,
|
30 |
conf_threshold: gr.inputs.Slider = 0.25,
|
31 |
+
iou_threshold: gr.inputs.Slider = 0.45
|
32 |
):
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
33 |
model = YOLO(model_path)
|
34 |
model.overrides['conf'] = conf_threshold
|
35 |
model.overrides['iou']= iou_threshold
|