Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -7,7 +7,7 @@ def download_models(model_id):
|
|
| 7 |
return f"./{model_id}"
|
| 8 |
|
| 9 |
@spaces.GPU
|
| 10 |
-
def
|
| 11 |
"""
|
| 12 |
Load a YOLOv9 model, configure it, perform inference on an image, and optionally adjust
|
| 13 |
the input size and apply test time augmentation.
|
|
@@ -78,7 +78,7 @@ def app():
|
|
| 78 |
step=0.1,
|
| 79 |
value=0.5,
|
| 80 |
)
|
| 81 |
-
|
| 82 |
|
| 83 |
with gr.Column():
|
| 84 |
output_image = gr.Image(type="numpy",label="Output")
|
|
|
|
| 7 |
return f"./{model_id}"
|
| 8 |
|
| 9 |
@spaces.GPU
|
| 10 |
+
def yolov8_inference(img_path, model_id, image_size, conf_threshold, iou_threshold):
|
| 11 |
"""
|
| 12 |
Load a YOLOv9 model, configure it, perform inference on an image, and optionally adjust
|
| 13 |
the input size and apply test time augmentation.
|
|
|
|
| 78 |
step=0.1,
|
| 79 |
value=0.5,
|
| 80 |
)
|
| 81 |
+
yolov8_infer = gr.Button(value="Inference")
|
| 82 |
|
| 83 |
with gr.Column():
|
| 84 |
output_image = gr.Image(type="numpy",label="Output")
|