Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -20,7 +20,7 @@ class YOLODetect():
|
|
20 |
return render
|
21 |
|
22 |
# Inicializa el modelo YOLOv8
|
23 |
-
path_best_model = 'yolov8n.pt'
|
24 |
modelo_yolo = YOLO(path_best_model)
|
25 |
|
26 |
def detect_objects(im, size, iou, conf):
|
@@ -52,7 +52,7 @@ def save_feedback(size, iou, conf,
|
|
52 |
|
53 |
# Configura la interfaz de Gradio
|
54 |
with gr.Blocks() as demo:
|
55 |
-
gr.Markdown("# YOLOv8 Detecci贸n de
|
56 |
|
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)
|
@@ -63,7 +63,7 @@ with gr.Blocks() as demo:
|
|
63 |
uploaded_image = gr.Image(type="pil", label="Cargar imagen")
|
64 |
result_image = gr.Image(label="Resultado")
|
65 |
|
66 |
-
detect_btn = gr.Button("Detectar
|
67 |
|
68 |
objects_table = gr.DataFrame(label="Objetos detectados")
|
69 |
feedback = gr.Textbox(label="Ingrese su feedback (m谩ximo 100 caracteres)", max_lines=2)
|
|
|
20 |
return render
|
21 |
|
22 |
# Inicializa el modelo YOLOv8
|
23 |
+
path_best_model = 'yolov8n-pose.pt'
|
24 |
modelo_yolo = YOLO(path_best_model)
|
25 |
|
26 |
def detect_objects(im, size, iou, conf):
|
|
|
52 |
|
53 |
# Configura la interfaz de Gradio
|
54 |
with gr.Blocks() as demo:
|
55 |
+
gr.Markdown("# YOLOv8 Detecci贸n de postura")
|
56 |
|
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)
|
|
|
63 |
uploaded_image = gr.Image(type="pil", label="Cargar imagen")
|
64 |
result_image = gr.Image(label="Resultado")
|
65 |
|
66 |
+
detect_btn = gr.Button("Detectar postura")
|
67 |
|
68 |
objects_table = gr.DataFrame(label="Objetos detectados")
|
69 |
feedback = gr.Textbox(label="Ingrese su feedback (m谩ximo 100 caracteres)", max_lines=2)
|