Spaces:
Paused
Paused
backup
Browse files
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 |
-
|
|
|
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():
|