Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -3,12 +3,14 @@ import pandas as pd
|
|
3 |
from datetime import datetime
|
4 |
import os
|
5 |
from huggingface_hub import HfApi, HfFolder, Repository
|
6 |
-
import os
|
7 |
-
HF_TOKEN = os.getenv("HF_TOKEN")
|
8 |
|
9 |
-
#
|
10 |
-
|
11 |
-
|
|
|
|
|
|
|
|
|
12 |
|
13 |
# Authenticate with Hugging Face Hub
|
14 |
api = HfApi()
|
|
|
3 |
from datetime import datetime
|
4 |
import os
|
5 |
from huggingface_hub import HfApi, HfFolder, Repository
|
|
|
|
|
6 |
|
7 |
+
# Authenticate with Hugging Face using the secret token
|
8 |
+
api = HfApi()
|
9 |
+
HfFolder.save_token(HF_TOKEN)
|
10 |
+
|
11 |
+
# Use the token to access or modify your repository
|
12 |
+
repo = Repository(local_dir="temp_repo", clone_from="Abu1998/DataCollection", use_auth_token=HF_TOKEN)
|
13 |
+
|
14 |
|
15 |
# Authenticate with Hugging Face Hub
|
16 |
api = HfApi()
|