vincentlui commited on
Commit
2d81c22
1 Parent(s): 071344b
Files changed (1) hide show
  1. app.py +7 -5
app.py CHANGED
@@ -8,11 +8,13 @@ from hand_record import create_hand_record_pdf
8
  from pbn_util import validate_pbn, create_single_pbn_string
9
 
10
  # Download model and libraries from repo
11
- # try:
12
- # token = os.environ.get("model_token")
13
- # subprocess.run(["git", "clone", f"https://oauth2:{token}@huggingface.co/vincentlui/bridge_hand_detect"])
14
- # except:
15
- # print('Fail to download code')
 
 
16
 
17
  try:
18
  from bridge_hand_detect2.predict import CardDetectionModel
 
8
  from pbn_util import validate_pbn, create_single_pbn_string
9
 
10
  # Download model and libraries from repo
11
+ try:
12
+ token = os.environ.get("model_token")
13
+ if token:
14
+ subprocess.run(["git", "clone", f"https://oauth2:{token}@huggingface.co/vincentlui/bridge_hand_detect"])
15
+ subprocess.run(["git", "pull"])
16
+ except:
17
+ print('Fail to download code')
18
 
19
  try:
20
  from bridge_hand_detect2.predict import CardDetectionModel