linhcuem commited on
Commit
d79d5f3
1 Parent(s): 55bb760

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -5
app.py CHANGED
@@ -30,7 +30,7 @@ image_path = [['test_images/2a998cfb0901db5f8210.jpg','cham_diem_yolov8', 640, 0
30
  # Load YOLO model
31
  # model = YOLO('linhcuem/cham_diem_yolov8')
32
  # model = YOLO('linhcuem/chamdiemgianhang_yolov8_300epochs')
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
 
@@ -38,7 +38,7 @@ image_path = [['test_images/2a998cfb0901db5f8210.jpg','cham_diem_yolov8', 640, 0
38
  # current_model_id = model_ids[-1]
39
  # model = YOLO(current_model_id)
40
  # model = YOLO(model_path)
41
- model_path = download_from_hub("linhcuem/checker_TB_yolov8_ver1", "linhcuem/chamdiemgianhang_yolov8_ver21")
42
 
43
  ###################################################
44
  def yolov8_img_inference(
@@ -50,7 +50,7 @@ def yolov8_img_inference(
50
 
51
  ):
52
 
53
- model = YOLO(model_path)
54
 
55
  model.conf = conf_threshold
56
  model.iou = iou_threshold
@@ -134,8 +134,8 @@ interface_image = gr.Interface(
134
  fn=yolov8_img_inference,
135
  inputs=[
136
  gr.Image(type='pil'),
137
- gr.Dropdown(["linhcuem/checker_TB_yolov8_ver1", "linhcuem/chamdiemgianhang_yolov8_ver21"],
138
- default="linhcuem/checker_TB_yolov8_ver1", label="Model"),
139
  gr.Slider(minimum=320, maximum=1280, default=640, step=32, label="Image Size"),
140
  gr.Slider(minimum=0.0, maximum=1.0, default=0.25, step=0.05, label="Confidence Threshold"),
141
  gr.Slider(minimum=0.0, maximum=1.0, default=0.45, step=0.05, label="IOU Threshold"),
 
30
  # Load YOLO model
31
  # model = YOLO('linhcuem/cham_diem_yolov8')
32
  # model = YOLO('linhcuem/chamdiemgianhang_yolov8_300epochs')
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
 
 
38
  # current_model_id = model_ids[-1]
39
  # model = YOLO(current_model_id)
40
  # model = YOLO(model_path)
41
+ # model_path = download_from_hub("linhcuem/checker_TB_yolov8_ver1", "linhcuem/chamdiemgianhang_yolov8_ver21")
42
 
43
  ###################################################
44
  def yolov8_img_inference(
 
50
 
51
  ):
52
 
53
+ # model = YOLO(model_path)
54
 
55
  model.conf = conf_threshold
56
  model.iou = iou_threshold
 
134
  fn=yolov8_img_inference,
135
  inputs=[
136
  gr.Image(type='pil'),
137
+ gr.Dropdown([ "linhcuem/chamdiemgianhang_yolov8_ver21"],
138
+ default="linhcuem/chamdiemgianhang_yolov8_ver21", label="Model"),
139
  gr.Slider(minimum=320, maximum=1280, default=640, step=32, label="Image Size"),
140
  gr.Slider(minimum=0.0, maximum=1.0, default=0.25, step=0.05, label="Confidence Threshold"),
141
  gr.Slider(minimum=0.0, maximum=1.0, default=0.45, step=0.05, label="IOU Threshold"),