taesiri commited on
Commit
a55e212
·
1 Parent(s): 7f8f3ca
Files changed (1) hide show
  1. app.py +3 -2
app.py CHANGED
@@ -45,9 +45,10 @@ def sync_with_hub():
45
  shutil.copytree(data_dir, backup_dir)
46
 
47
  # Clone/pull latest data from hub
48
- # Use token in the URL for authentication
49
  token = os.environ["HF_TOKEN"]
50
- repo_url = f"https://{token}@huggingface.co/datasets/{DATASET_REPO}"
 
51
  hub_data_dir = Path("hub_data")
52
 
53
  if hub_data_dir.exists():
 
45
  shutil.copytree(data_dir, backup_dir)
46
 
47
  # Clone/pull latest data from hub
48
+ # Use token in the URL for authentication following HF's new format
49
  token = os.environ["HF_TOKEN"]
50
+ username = "taesiri" # Extract from DATASET_REPO
51
+ repo_url = f"https://{username}:{token}@huggingface.co/datasets/{DATASET_REPO}"
52
  hub_data_dir = Path("hub_data")
53
 
54
  if hub_data_dir.exists():