File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -85,9 +85,19 @@ brew install act
8585
8686``` bash
8787act -j run --verbose
88+ ```
8889
8990Use the verbose flag, at least the first time, since the image downloads take so long
9091
92+ ## Run the HuggingFace update script locally via Python
93+
94+ ``` bash
95+ export HUGGINGFACE_LOGIN_TOKEN=< xxx>
96+ export VITE_ENV=DEV
97+ cd src/scripts
98+ python updateHfDataset.py
99+ ```
100+
91101### Information About Technologies
92102
93103- Frontend
Original file line number Diff line number Diff line change @@ -102,6 +102,17 @@ def hfUpload(year=None):
102102
103103 login (TOKEN )
104104 api = HfApi ()
105+
106+ # If the current year's repo doesn't exist, create it
107+ # the exist_ok=True flag means we'll ignore any errors if it already exists
108+ url = api .create_repo (
109+ repo_id = repo_id ,
110+ token = TOKEN ,
111+ private = False ,
112+ repo_type = "dataset" ,
113+ exist_ok = True ,
114+ )
115+
105116 api .upload_file (
106117 path_or_fileobj = local_filename ,
107118 path_in_repo = dest_filename ,
You can’t perform that action at this time.
0 commit comments