Open
Description
This link details a method to submit files to one's HF repo using the huggingface_hub.upload_file
function.
from huggingface_hub import upload_file
upload_file(
"<path_to_file>/config.json",
path_in_repo="config.json",
repo_id="<namespace>/dummy-model",
)
This is however not working as of version 0.26.2. Please replace the code with the newer syntax explained here:
from huggingface_hub import HfApi
api = HfApi()
api.upload_file(
path_or_fileobj="<path_to_file>/config.json",,
path_in_repo="config.json",
repo_id="<namespace>/dummy-model",
)
Thank you!
Metadata
Assignees
Labels
No labels