Miquel Farré commited on
Commit
f1f70c0
·
1 Parent(s): ed698f3
Files changed (1) hide show
  1. app.py +6 -2
app.py CHANGED
@@ -16,9 +16,13 @@ def commit_signup(username: str) -> Optional[str]:
16
  try:
17
  # Always get the latest data right before committing
18
  try:
19
- current_data = pd.read_csv(
20
- f"https://huggingface.co/datasets/{DATASET_REPO}/raw/main/waitlist.csv"
 
 
 
21
  )
 
22
  if 'userid' not in current_data.columns or 'joined_at' not in current_data.columns:
23
  current_data = pd.DataFrame(columns=['userid', 'joined_at'])
24
  except Exception as e:
 
16
  try:
17
  # Always get the latest data right before committing
18
  try:
19
+ file_content = hf_api.hf_hub_download(
20
+ repo_id=DATASET_REPO,
21
+ repo_type="dataset",
22
+ filename="waitlist.csv",
23
+ token=os.getenv("HF_TOKEN")
24
  )
25
+ current_data = pd.read_csv(file_content)
26
  if 'userid' not in current_data.columns or 'joined_at' not in current_data.columns:
27
  current_data = pd.DataFrame(columns=['userid', 'joined_at'])
28
  except Exception as e: