Tom Aarsen commited on
Commit
b0fce8f
1 Parent(s): 0db6673

Update huggingface_hub from 0.0.16 to 0.13.4

Browse files

Should resolve #2

cookiecutter.json CHANGED
@@ -1,5 +1,5 @@
1
  {
2
  "hf_hub_username": "huggingface",
3
- "hf_hub_password": "password",
4
  "repo_name": "my-raft-submission"
5
  }
 
1
  {
2
  "hf_hub_username": "huggingface",
3
+ "hf_access_token": "hf_access_token",
4
  "repo_name": "my-raft-submission"
5
  }
hooks/pre_gen_project.py CHANGED
@@ -1,19 +1,16 @@
1
- from huggingface_hub import HfApi, HfFolder, Repository
2
-
3
- hf_user = "{{cookiecutter.hf_hub_username}}"
4
- hf_password = "{{cookiecutter.hf_hub_password}}"
5
- huggingface_token = HfApi().login(username=hf_user, password=hf_password)
6
- HfFolder.save_token(huggingface_token)
7
 
 
8
  repo_url = HfApi().create_repo(
9
- token=huggingface_token,
10
- name="{{cookiecutter.repo_name}}",
11
- organization=hf_user,
12
  exist_ok=True,
13
  private=True,
14
  repo_type="dataset",
15
  )
16
 
17
  model_repo = Repository(
18
- local_dir=".", clone_from=repo_url, use_auth_token=huggingface_token
 
 
19
  )
 
1
+ from huggingface_hub import HfApi, Repository
 
 
 
 
 
2
 
3
+ hf_access_token = "{{cookiecutter.hf_access_token}}"
4
  repo_url = HfApi().create_repo(
5
+ repo_id="{{cookiecutter.hf_hub_username}}/{{cookiecutter.repo_name}}",
6
+ token=hf_access_token,
 
7
  exist_ok=True,
8
  private=True,
9
  repo_type="dataset",
10
  )
11
 
12
  model_repo = Repository(
13
+ local_dir=".",
14
+ clone_from=repo_url,
15
+ token=hf_access_token,
16
  )
requirements.txt CHANGED
@@ -1,4 +1,4 @@
1
  datasets>=1.11.0
2
  typer
3
  cookiecutter
4
- huggingface-hub==0.0.16
 
1
  datasets>=1.11.0
2
  typer
3
  cookiecutter
4
+ huggingface-hub==0.13.4