mgyigit commited on
Commit
e4f1c41
·
verified ·
1 Parent(s): 72f8568

Update src/saving_utils.py

Browse files
Files changed (1) hide show
  1. src/saving_utils.py +1 -1
src/saving_utils.py CHANGED
@@ -20,7 +20,7 @@ def save_csv_locally(dataframe, file_name, save_dir="/tmp"):
20
  return file_path
21
 
22
  def upload_to_hub(local_path, remote_path, repo_id, repo_type="space"):
23
- api = HfApi() # Requires authentication via HF_TOKEN
24
  api.upload_file(
25
  path_or_fileobj=local_path,
26
  path_in_repo=remote_path,
 
20
  return file_path
21
 
22
  def upload_to_hub(local_path, remote_path, repo_id, repo_type="space"):
23
+ api = HfApi(token=os.getenv("api_key")) # Requires authentication via HF_TOKEN
24
  api.upload_file(
25
  path_or_fileobj=local_path,
26
  path_in_repo=remote_path,