Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -31,7 +31,10 @@ image_path = [['test_images/2a998cfb0901db5f8210.jpg','cham_diem_yolov8', 640, 0
|
|
31 |
# model = YOLO('linhcuem/chamdiemgianhang_yolov8_300epochs')
|
32 |
# model = YOLO('linhcuem/chamdiemgianhang_yolov8_ver21')
|
33 |
# model = YOLO('linhcuem/cham_diem_yolov8_ver20')
|
34 |
-
|
|
|
|
|
|
|
35 |
|
36 |
###################################################
|
37 |
def yolov8_img_inference(
|
@@ -149,8 +152,9 @@ interface_vid = gr.Interface(
|
|
149 |
inputs_image = [
|
150 |
# gr.inputs.Image(type="filepath", label="Input Image"),
|
151 |
gr.Image(type="pil"),
|
152 |
-
gr.Dropdown(["linhcuem/linhcuem/chamdiemgianhang_yolov8_ver1"],
|
153 |
default="linhcuem/chamdiemgianhang_yolov8_ver1", label="Model"),
|
|
|
154 |
gr.Slider(maximum=1280, step=32, value = 640, label="Image Size"),
|
155 |
gr.Slider(maximum=1.0 , step=0.05, value = 0.25, label="Confidence Threshold"),
|
156 |
gr.Slider(maximum=1.0, step=0.05, value = 0.45, label="IOU Threshold"),
|
@@ -167,8 +171,9 @@ interface_image = gr.Interface(
|
|
167 |
fn=yolov8_img_inference,
|
168 |
inputs=[
|
169 |
gr.Image(type='pil'),
|
170 |
-
gr.Dropdown(["linhcuem/chamdiemgianhang_yolov8_ver1"],
|
171 |
-
|
|
|
172 |
gr.Slider(maximum=1280, step=32, value=640),
|
173 |
gr.Slider(maximum=1.0, step=0.05, value=0.25),
|
174 |
gr.Slider(maximum=1.0, step=0.05, value=0.45),
|
|
|
31 |
# model = YOLO('linhcuem/chamdiemgianhang_yolov8_300epochs')
|
32 |
# model = YOLO('linhcuem/chamdiemgianhang_yolov8_ver21')
|
33 |
# model = YOLO('linhcuem/cham_diem_yolov8_ver20')
|
34 |
+
model_ids = ['linhcuem/checker_TB_yolov8_ver1', 'linhcuem/cham_diem_yolov8', 'linhcuem/chamdiemgianhang_yolov8_300epochs', 'linhcuem/cham_diem_yolov8_ver20', 'linhcuem/chamdiemgianhang_yolov8_ver21']
|
35 |
+
current_model_id = model_ids[-1]
|
36 |
+
model = YOLO(current_model_id)
|
37 |
+
|
38 |
|
39 |
###################################################
|
40 |
def yolov8_img_inference(
|
|
|
152 |
inputs_image = [
|
153 |
# gr.inputs.Image(type="filepath", label="Input Image"),
|
154 |
gr.Image(type="pil"),
|
155 |
+
# gr.Dropdown(["linhcuem/linhcuem/chamdiemgianhang_yolov8_ver1"],
|
156 |
default="linhcuem/chamdiemgianhang_yolov8_ver1", label="Model"),
|
157 |
+
|
158 |
gr.Slider(maximum=1280, step=32, value = 640, label="Image Size"),
|
159 |
gr.Slider(maximum=1.0 , step=0.05, value = 0.25, label="Confidence Threshold"),
|
160 |
gr.Slider(maximum=1.0, step=0.05, value = 0.45, label="IOU Threshold"),
|
|
|
171 |
fn=yolov8_img_inference,
|
172 |
inputs=[
|
173 |
gr.Image(type='pil'),
|
174 |
+
# gr.Dropdown(["linhcuem/chamdiemgianhang_yolov8_ver1"],
|
175 |
+
# default="linhcuem/chamdiemgianhang_yolov8_ver1"),
|
176 |
+
gr.Dropdown(model_ids, value=model_ids[-1]),
|
177 |
gr.Slider(maximum=1280, step=32, value=640),
|
178 |
gr.Slider(maximum=1.0, step=0.05, value=0.25),
|
179 |
gr.Slider(maximum=1.0, step=0.05, value=0.45),
|