File tree Expand file tree Collapse file tree 2 files changed +10
-0
lines changed
policyengine_us_data/utils Expand file tree Collapse file tree 2 files changed +10
-0
lines changed Original file line number Diff line number Diff line change 1+ - bump : patch
2+ changes :
3+ fixed :
4+ - Missing HF token.
Original file line number Diff line number Diff line change 66from importlib import metadata
77import google .auth
88import logging
9+ import os
910
1011
1112def upload_data_files (
@@ -44,6 +45,9 @@ def upload_files_to_hf(
4445 api = HfApi ()
4546 hf_operations = []
4647
48+ token = os .environ .get (
49+ "HUGGING_FACE_TOKEN" ,
50+ )
4751 for file_path in files :
4852 file_path = Path (file_path )
4953 if not file_path .exists ():
@@ -55,6 +59,7 @@ def upload_files_to_hf(
5559 )
5660 )
5761 commit_info = api .create_commit (
62+ token = token ,
5863 repo_id = hf_repo_name ,
5964 operations = hf_operations ,
6065 repo_type = hf_repo_type ,
@@ -64,6 +69,7 @@ def upload_files_to_hf(
6469
6570 # Tag commit with version
6671 api .create_tag (
72+ token = token ,
6773 repo_id = hf_repo_name ,
6874 tag = version ,
6975 revision = commit_info .oid ,
You can’t perform that action at this time.
0 commit comments