Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -9,7 +9,7 @@ class YOLODetect():
|
|
9 |
def __init__(self, modelo):
|
10 |
self.modelo = modelo
|
11 |
|
12 |
-
def predecir(self, source, imgsz=
|
13 |
self.results = self.modelo.predict(source=source, save=True, imgsz=imgsz, conf=conf, iou=iou)
|
14 |
return self.results
|
15 |
|
@@ -57,7 +57,7 @@ with gr.Blocks() as demo:
|
|
57 |
with gr.Row():
|
58 |
iou_threshold = gr.Slider(label="NMS IoU Threshold (0.0 - 1.0)", minimum=0.0, maximum=1.0, value=0.8)
|
59 |
conf_threshold = gr.Slider(label="Umbral o threshold (0.0 - 1.0)", minimum=0.0, maximum=1.0, value=0.9)
|
60 |
-
size = gr.Dropdown(label="Tamaño de la imagen", choices=["640", "1280"], value="
|
61 |
|
62 |
with gr.Row():
|
63 |
uploaded_image = gr.Image(type="pil", label="Cargar imagen")
|
|
|
9 |
def __init__(self, modelo):
|
10 |
self.modelo = modelo
|
11 |
|
12 |
+
def predecir(self, source, imgsz=640, conf=0.7, iou=0.50):
|
13 |
self.results = self.modelo.predict(source=source, save=True, imgsz=imgsz, conf=conf, iou=iou)
|
14 |
return self.results
|
15 |
|
|
|
57 |
with gr.Row():
|
58 |
iou_threshold = gr.Slider(label="NMS IoU Threshold (0.0 - 1.0)", minimum=0.0, maximum=1.0, value=0.8)
|
59 |
conf_threshold = gr.Slider(label="Umbral o threshold (0.0 - 1.0)", minimum=0.0, maximum=1.0, value=0.9)
|
60 |
+
size = gr.Dropdown(label="Tamaño de la imagen", choices=["640", "1280"], value="640")
|
61 |
|
62 |
with gr.Row():
|
63 |
uploaded_image = gr.Image(type="pil", label="Cargar imagen")
|