Abu1998 commited on
Commit
941336c
·
verified ·
1 Parent(s): 5bf9ac2

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +7 -5
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
- # Constants for Hugging Face
10
- REPO_ID = "Abu1998/DataCollection" # Replace with your dataset repository name
11
- STORAGE_PATH = "appointments.csv"
 
 
 
 
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()