Commit ·
a1dab0b
1
Parent(s): 114c1f1
Update app.py
Browse files
app.py
CHANGED
|
@@ -7,9 +7,9 @@ from ultralyticsplus import YOLO
|
|
| 7 |
def yolov8_inference(
|
| 8 |
image: gr.Image = None,
|
| 9 |
model_path: gr.Dropdown = None,
|
| 10 |
-
image_size:
|
| 11 |
-
conf_threshold:
|
| 12 |
-
iou_threshold:
|
| 13 |
):
|
| 14 |
"""
|
| 15 |
YOLOv8 inference function
|
|
@@ -39,9 +39,9 @@ inputs = [
|
|
| 39 |
choices=["foduucom/Tyre-Quality-Classification-AI"],
|
| 40 |
value="foduucom/Tyre-Quality-Classification-AI",
|
| 41 |
label="Model"),
|
| 42 |
-
gr.Slider(minimum=320, maximum=1280,
|
| 43 |
-
gr.Slider(minimum=0.0, maximum=1.0,
|
| 44 |
-
gr.Slider(minimum=0.0, maximum=1.0,
|
| 45 |
]
|
| 46 |
|
| 47 |
outputs = gr.Text(Class1)
|
|
|
|
| 7 |
def yolov8_inference(
|
| 8 |
image: gr.Image = None,
|
| 9 |
model_path: gr.Dropdown = None,
|
| 10 |
+
image_size: int = 640, # Set default value here
|
| 11 |
+
conf_threshold: float = 0.25, # Set default value here
|
| 12 |
+
iou_threshold: float = 0.45, # Set default value here
|
| 13 |
):
|
| 14 |
"""
|
| 15 |
YOLOv8 inference function
|
|
|
|
| 39 |
choices=["foduucom/Tyre-Quality-Classification-AI"],
|
| 40 |
value="foduucom/Tyre-Quality-Classification-AI",
|
| 41 |
label="Model"),
|
| 42 |
+
gr.Slider(minimum=320, maximum=1280, step=32, label="Image Size"),
|
| 43 |
+
gr.Slider(minimum=0.0, maximum=1.0, step=0.05, label="Confidence Threshold"),
|
| 44 |
+
gr.Slider(minimum=0.0, maximum=1.0, step=0.05, label="IOU Threshold"),
|
| 45 |
]
|
| 46 |
|
| 47 |
outputs = gr.Text(Class1)
|