Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -90,7 +90,8 @@ def yolov8_img_inference(
|
|
90 |
|
91 |
|
92 |
inputs_image = [
|
93 |
-
gr.inputs.Image(type="filepath", label="Input Image"),
|
|
|
94 |
gr.inputs.Dropdown(["linhcuem/linhcuem/cham_diem_yolov8"],
|
95 |
default="linhcuem/cham_diem_yolov8", label="Model"),
|
96 |
gr.inputs.Slider(minimum=320, maximum=1280, default=640, step=32, label="Image Size"),
|
@@ -98,15 +99,15 @@ inputs_image = [
|
|
98 |
gr.inputs.Slider(minimum=0.0, maximum=1.0, default=0.45, step=0.05, label="IOU Threshold"),
|
99 |
]
|
100 |
|
101 |
-
outputs_image =gr.outputs.Image(type="filepath", label="Output Image")
|
102 |
-
count_obj = gr.Textbox(show_label=False)
|
103 |
|
104 |
title = "Tất cả do anh Đạt"
|
105 |
|
106 |
interface_image = gr.Interface(
|
107 |
fn=yolov8_img_inference,
|
108 |
inputs=inputs_image,
|
109 |
-
outputs=[
|
110 |
title=title,
|
111 |
examples=image_path,
|
112 |
cache_examples=True,
|
|
|
90 |
|
91 |
|
92 |
inputs_image = [
|
93 |
+
# gr.inputs.Image(type="filepath", label="Input Image"),
|
94 |
+
gr.inputs.Image(type="pil"),
|
95 |
gr.inputs.Dropdown(["linhcuem/linhcuem/cham_diem_yolov8"],
|
96 |
default="linhcuem/cham_diem_yolov8", label="Model"),
|
97 |
gr.inputs.Slider(minimum=320, maximum=1280, default=640, step=32, label="Image Size"),
|
|
|
99 |
gr.inputs.Slider(minimum=0.0, maximum=1.0, default=0.45, step=0.05, label="IOU Threshold"),
|
100 |
]
|
101 |
|
102 |
+
# outputs_image =gr.outputs.Image(type="filepath", label="Output Image")
|
103 |
+
# count_obj = gr.Textbox(show_label=False)
|
104 |
|
105 |
title = "Tất cả do anh Đạt"
|
106 |
|
107 |
interface_image = gr.Interface(
|
108 |
fn=yolov8_img_inference,
|
109 |
inputs=inputs_image,
|
110 |
+
outputs=[gr.Image(type="pil"),gr.Textbox(show_label=False)],
|
111 |
title=title,
|
112 |
examples=image_path,
|
113 |
cache_examples=True,
|