raft-submission / hooks /pre_gen_project.py
lewtun's picture
lewtun HF staff
Update `huggingface_hub` version to avoid 404 Client Error (#3)
9eb87c8
raw
history blame contribute delete
397 Bytes
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,
)