linhcuem commited on
Commit
1351229
1 Parent(s): 63a67c6

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -1
app.py CHANGED
@@ -11,6 +11,7 @@ from PIL import Image
11
  from huggingface_hub import hf_hub_download
12
 
13
  from ultralyticsplus import YOLO, render_result
 
14
 
15
  # from ultralyticsplus import render_result
16
  # import requests
@@ -32,7 +33,8 @@ image_path = [['test_images/2a998cfb0901db5f8210.jpg','cham_diem_yolov8', 640, 0
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
- model = YOLO('linhcuem/checker_TB_yolov8_ver1')
 
36
  # current_model_id = model_ids[-1]
37
  # model = YOLO(current_model_id)
38
  # model = YOLO(model_path)
 
11
  from huggingface_hub import hf_hub_download
12
 
13
  from ultralyticsplus import YOLO, render_result
14
+ from ultralyticsplus.hf_utils import download_from_hub
15
 
16
  # from ultralyticsplus import render_result
17
  # import requests
 
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)