elibrowne commited on
Commit
e0cafff
·
1 Parent(s): bdd01c1

Load data after login

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -37,7 +37,7 @@ mode = 0
37
  def load_user_data(id):
38
  global user_data
39
  filename = id.replace('@', '_AT_').replace('.', '_DOT_')
40
- if file_exists("users/" + filename + ".json", "ebrowne/test-data"):
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")
 
37
  def load_user_data(id):
38
  global user_data
39
  filename = id.replace('@', '_AT_').replace('.', '_DOT_')
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")