Spaces:
Running
Running
vincentlui
commited on
Commit
•
2d81c22
1
Parent(s):
071344b
git clone
Browse files
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 |
-
|
12 |
-
|
13 |
-
|
14 |
-
|
15 |
-
|
|
|
|
|
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
|