Spaces:
Sleeping
Sleeping
elibrowne
commited on
Commit
·
1991ca2
1
Parent(s):
e0cafff
Load data after login
Browse files
app.py
CHANGED
@@ -40,7 +40,7 @@ def load_user_data(id):
|
|
40 |
if file_exists(filename = "users/" + filename + ".json", repo_id = "ebrowne/test-data", repo_type = "dataset"):
|
41 |
print("File exists, downloading data.")
|
42 |
# If the ID exists, download the file from HuggingFace
|
43 |
-
path = hf_hub_download(repo_id="ebrowne/test-data", token = os.getenv("HF_TOKEN"), filename="users/" + filename + ".json")
|
44 |
# Add their current status to user_data
|
45 |
with open(path, "r") as f:
|
46 |
user_data = json.load(f)
|
|
|
40 |
if file_exists(filename = "users/" + filename + ".json", repo_id = "ebrowne/test-data", repo_type = "dataset"):
|
41 |
print("File exists, downloading data.")
|
42 |
# If the ID exists, download the file from HuggingFace
|
43 |
+
path = hf_hub_download(repo_id = "ebrowne/test-data", token = os.getenv("HF_TOKEN"), filename = "users/" + filename + ".json", repo_type = "dataset")
|
44 |
# Add their current status to user_data
|
45 |
with open(path, "r") as f:
|
46 |
user_data = json.load(f)
|