Skip to content

Instantly share code, notes, and snippets.

@do-me
Created February 9, 2025 18:28
Show Gist options
  • Save do-me/3abdf9a85717bfdf97a7234a1b2341a6 to your computer and use it in GitHub Desktop.
Save do-me/3abdf9a85717bfdf97a7234a1b2341a6 to your computer and use it in GitHub Desktop.
Upload many files with git to Huggingface repo
huggingface-cli login # logs in with a suitable HF token
huggingface-cli upload do-me/Eurovoc_English . files # all files must be in cwd
@do-me
Copy link
Author

do-me commented Feb 10, 2025

Alternatively use python API:

from huggingface_hub import HfApi
api = HfApi()
# Upload all the content from the local folder to your remote Space.
# By default, files are uploaded at the root of the repo
api.upload_large_folder(
    folder_path="Eurovoc_English/files_en",
    repo_id="do-me/Eurovoc_English",
    repo_type="dataset",
)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment