huggingface / huggingface_hub

The official Python client for the Huggingface Hub.
https://huggingface.co/docs/huggingface_hub
Apache License 2.0
1.97k stars 513 forks source link

[CLI] hugging-face init command to help bootstrap new dataset, model, spaces #1844

Open remyleone opened 9 months ago

remyleone commented 9 months ago

Is your feature request related to a problem? Please describe.

When I'm starting a project want to upload a dataset to hugging face, I would like to have help from the command line.

Describe the solution you'd like

huggingface-cli init

You could have a wizard that ask the same questions that exists on the hugging face web interface. Offering to create the git repository if it does not exist yet. once the model card is created locally, printing on the screen the information to upload it to hugging face servers

Describe alternatives you've considered

creating the new data model from the web interface

Wauplin commented 9 months ago

Thanks for the suggestion @remyleone. For now I'll push back a bit on adding new commands to the CLI too quickly. We already have a command to create an empty repo:

✗ huggingface-cli repo create --help
usage: huggingface-cli <command> [<args>] repo create [-h] [--type TYPE] [--organization ORGANIZATION] [--space_sdk {gradio,streamlit,docker,static}] [-y] name

positional arguments:
  name                  Name for your repo. Will be namespaced under your username to build the repo id.

options:
  -h, --help            show this help message and exit
  --type TYPE           Optional: repo_type: set to "dataset" or "space" if creating a dataset or space, default is model.
  --organization ORGANIZATION
                        Optional: organization namespace.
  --space_sdk {gradio,streamlit,docker,static}
                        Optional: Hugging Face Spaces SDK type. Required when --type is set to "space".
  -y, --yes             Optional: answer Yes to the prompt

Though this is not exactly the same as the one you suggest (no wizard and no way to set a license), I think it's still enough for most user cases. I'll keep this issue open for now and reassess if we have more demand.