linhcuem commited on
Commit
e97ca08
1 Parent(s): 1351229

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -4
app.py CHANGED
@@ -33,8 +33,8 @@ image_path = [['test_images/2a998cfb0901db5f8210.jpg','cham_diem_yolov8', 640, 0
33
  # model = YOLO('linhcuem/chamdiemgianhang_yolov8_ver21')
34
  # model = YOLO('linhcuem/cham_diem_yolov8_ver20')
35
  # model_ids = ['linhcuem/checker_TB_yolov8_ver1', 'linhcuem/cham_diem_yolov8', 'linhcuem/chamdiemgianhang_yolov8_300epochs', 'linhcuem/cham_diem_yolov8_ver20', 'linhcuem/chamdiemgianhang_yolov8_ver21']
36
- model_path = download_from_hub('linhcuem/checker_TB_yolov8_ver1')
37
- model = YOLO(model_path)
38
  # current_model_id = model_ids[-1]
39
  # model = YOLO(current_model_id)
40
  # model = YOLO(model_path)
@@ -47,7 +47,7 @@ def yolov8_img_inference(
47
  conf_threshold: gr.inputs.Slider = 0.25,
48
  iou_threshold: gr.inputs.Slider = 0.45,
49
  ):
50
- # model = YOLO(model_path)
51
 
52
  model.conf = conf_threshold
53
  model.iou = iou_threshold
@@ -131,7 +131,7 @@ interface_image = gr.Interface(
131
  fn=yolov8_img_inference,
132
  inputs=[
133
  gr.Image(type='pil'),
134
- gr.Dropdown(["linhcuem/checker_TB_yolov8_ver1"],
135
  default="linhcuem/checker_TB_yolov8_ver1", label="Model"),
136
  gr.Slider(minimum=320, maximum=1280, default=640, step=32, label="Image Size"),
137
  gr.Slider(minimum=0.0, maximum=1.0, default=0.25, step=0.05, label="Confidence Threshold"),
 
33
  # model = YOLO('linhcuem/chamdiemgianhang_yolov8_ver21')
34
  # model = YOLO('linhcuem/cham_diem_yolov8_ver20')
35
  # model_ids = ['linhcuem/checker_TB_yolov8_ver1', 'linhcuem/cham_diem_yolov8', 'linhcuem/chamdiemgianhang_yolov8_300epochs', 'linhcuem/cham_diem_yolov8_ver20', 'linhcuem/chamdiemgianhang_yolov8_ver21']
36
+ model_path = download_from_hub('linhcuem/checker_TB_yolov8_ver1' , 'linhcuem/chamdiemgianhang_yolov8_ver21')
37
+ # model = YOLO(model_path)
38
  # current_model_id = model_ids[-1]
39
  # model = YOLO(current_model_id)
40
  # model = YOLO(model_path)
 
47
  conf_threshold: gr.inputs.Slider = 0.25,
48
  iou_threshold: gr.inputs.Slider = 0.45,
49
  ):
50
+ model = YOLO(model_path)
51
 
52
  model.conf = conf_threshold
53
  model.iou = iou_threshold
 
131
  fn=yolov8_img_inference,
132
  inputs=[
133
  gr.Image(type='pil'),
134
+ gr.Dropdown(["linhcuem/checker_TB_yolov8_ver1", "linhcuem/chamdiemgianhang_yolov8_ver21"],
135
  default="linhcuem/checker_TB_yolov8_ver1", label="Model"),
136
  gr.Slider(minimum=320, maximum=1280, default=640, step=32, label="Image Size"),
137
  gr.Slider(minimum=0.0, maximum=1.0, default=0.25, step=0.05, label="Confidence Threshold"),