osanseviero commited on
Commit
fc9e525
1 Parent(s): d9b47e0

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -20,10 +20,10 @@ def duplicate(source_repo, dst_repo, token, repo_type):
20
  url = create_repo(dst_id, token=token, organization=org, private=False)
21
 
22
  # Clone source repo
23
- endpoint = "https://huggingface.co/"
24
  if repo_type in ["space", "dataset"]:
25
  endpoint += repo_type
26
- full_path = endpoint + "/" + source_repo
27
  local_dir = "hub/" + source_repo
28
 
29
  if repo_type in ["space", "dataset"]:
 
20
  url = create_repo(dst_id, token=token, organization=org, private=False)
21
 
22
  # Clone source repo
23
+ endpoint = "huggingface.co/"
24
  if repo_type in ["space", "dataset"]:
25
  endpoint += repo_type
26
+ full_path = f"{https://{username}:{token}@{endpoint}/{source_repo}"
27
  local_dir = "hub/" + source_repo
28
 
29
  if repo_type in ["space", "dataset"]: