cccornflake commited on
Commit
a317482
·
verified ·
1 Parent(s): 0902778

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -9
app.py CHANGED
@@ -7,15 +7,8 @@ import os
7
  REPO_ID = 'vaivTA/yolov8x_doclaynet'
8
  FILENAME = "weights/best.pt"
9
 
10
- if os.path.exists('/home/user/app/weights/best.pt'):
11
- print("model exist.")
12
- if not os.path.exists('/home/user/app/weights/best.pt') :
13
-
14
-
15
- os.makedirs('/home/user/app/weights', exist_ok=True)
16
- os.chdir('/home/user/app')
17
- print("downloading model...")
18
- model_file = hf_hub_download(repo_id=REPO_ID, filename=FILENAME)
19
 
20
  model = YOLO(model_file)
21
 
 
7
  REPO_ID = 'vaivTA/yolov8x_doclaynet'
8
  FILENAME = "weights/best.pt"
9
 
10
+ print("downloading model...")
11
+ model_file = hf_hub_download(repo_id=REPO_ID, filename=FILENAME)
 
 
 
 
 
 
 
12
 
13
  model = YOLO(model_file)
14