Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -12,9 +12,9 @@ import yaml
|
|
12 |
from yaml.loader import SafeLoader
|
13 |
from PIL import Image
|
14 |
import os
|
15 |
-
from huggingface_hub import CommitScheduler, login
|
16 |
|
17 |
-
login(token=os.environ.get("HF_TOKEN"), write_permission=True)
|
18 |
|
19 |
|
20 |
AUTHENTICATOR = None
|
@@ -83,9 +83,9 @@ def user_login_create():
|
|
83 |
global TBYB_LOGO
|
84 |
global USER_LOGGED_IN
|
85 |
users = None
|
86 |
-
|
87 |
-
|
88 |
-
|
89 |
users = yaml.load(file, Loader=SafeLoader)
|
90 |
AUTHENTICATOR = stauth.Authenticate(
|
91 |
users['credentials'],
|
|
|
12 |
from yaml.loader import SafeLoader
|
13 |
from PIL import Image
|
14 |
import os
|
15 |
+
from huggingface_hub import CommitScheduler, login, snapshot_download
|
16 |
|
17 |
+
login(token=os.environ.get("HF_TOKEN"), write_permission=True, read_permission=True)
|
18 |
|
19 |
|
20 |
AUTHENTICATOR = None
|
|
|
83 |
global TBYB_LOGO
|
84 |
global USER_LOGGED_IN
|
85 |
users = None
|
86 |
+
snapshot_download(repo_id='JVice/try-before-you-bias-data',repo_type='dataset',local_dir='user_data')
|
87 |
+
newPath = 'user_data/data/user_database.yaml'
|
88 |
+
with open(newPath) as file:
|
89 |
users = yaml.load(file, Loader=SafeLoader)
|
90 |
AUTHENTICATOR = stauth.Authenticate(
|
91 |
users['credentials'],
|