Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -2,9 +2,11 @@ import gradio as gr
|
|
2 |
from ultralyticsplus import YOLO, render_result
|
3 |
from ultralytics.yolo.utils.plotting import Annotator
|
4 |
|
|
|
|
|
5 |
def yolov8_inference(
|
6 |
image: gr.Image = None,
|
7 |
-
|
8 |
conf_threshold: gr.Slider = 0.50,
|
9 |
iou_threshold: gr.Slider = 0.45,
|
10 |
):
|
@@ -18,7 +20,7 @@ def yolov8_inference(
|
|
18 |
Returns:
|
19 |
Rendered image
|
20 |
"""
|
21 |
-
model = YOLO(model_path)
|
22 |
model.conf = conf_threshold
|
23 |
model.iou = iou_threshold
|
24 |
model.overrides['max_det'] = 1
|
|
|
2 |
from ultralyticsplus import YOLO, render_result
|
3 |
from ultralytics.yolo.utils.plotting import Annotator
|
4 |
|
5 |
+
model = YOLO('eeshawn11/naruto_hand_seal_detection')
|
6 |
+
|
7 |
def yolov8_inference(
|
8 |
image: gr.Image = None,
|
9 |
+
model = model,
|
10 |
conf_threshold: gr.Slider = 0.50,
|
11 |
iou_threshold: gr.Slider = 0.45,
|
12 |
):
|
|
|
20 |
Returns:
|
21 |
Rendered image
|
22 |
"""
|
23 |
+
# model = YOLO(model_path)
|
24 |
model.conf = conf_threshold
|
25 |
model.iou = iou_threshold
|
26 |
model.overrides['max_det'] = 1
|