from huggingface_hub import HfApi, Repository | |
hf_access_token = "{{cookiecutter.hf_access_token}}" | |
repo_url = HfApi().create_repo( | |
repo_id="{{cookiecutter.hf_hub_username}}/{{cookiecutter.repo_name}}", | |
token=hf_access_token, | |
exist_ok=True, | |
private=True, | |
repo_type="dataset", | |
) | |
model_repo = Repository( | |
local_dir=".", | |
clone_from=repo_url, | |
token=hf_access_token, | |
) | |