in src/huggingface_hub/commands/upload_large_folder.py [0:0]
def register_subcommand(parser: _SubParsersAction):
subparser = parser.add_parser("upload-large-folder", help="Upload a large folder to a repo on the Hub")
subparser.add_argument(
"repo_id", type=str, help="The ID of the repo to upload to (e.g. `username/repo-name`)."
)
subparser.add_argument("local_path", type=str, help="Local path to the file or folder to upload.")
subparser.add_argument(
"--repo-type",
choices=["model", "dataset", "space"],
help="Type of the repo to upload to (e.g. `dataset`).",
)
subparser.add_argument(
"--revision",
type=str,
help=("An optional Git revision to push to. It can be a branch name or a PR reference."),
)
subparser.add_argument(
"--private",
action="store_true",
help=(
"Whether to create a private repo if repo doesn't exist on the Hub. Ignored if the repo already exists."
),
)
subparser.add_argument("--include", nargs="*", type=str, help="Glob patterns to match files to upload.")
subparser.add_argument("--exclude", nargs="*", type=str, help="Glob patterns to exclude from files to upload.")
subparser.add_argument(
"--token", type=str, help="A User Access Token generated from https://huggingface.co/settings/tokens"
)
subparser.add_argument(
"--num-workers", type=int, help="Number of workers to use to hash, upload and commit files."
)
subparser.add_argument("--no-report", action="store_true", help="Whether to disable regular status report.")
subparser.add_argument("--no-bars", action="store_true", help="Whether to disable progress bars.")
subparser.set_defaults(func=UploadLargeFolderCommand)