osanseviero commited on
Commit
dba25da
·
1 Parent(s): 050c83f

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -1
app.py CHANGED
@@ -38,7 +38,8 @@ def duplicate(source_repo, dst_repo, token, repo_type):
38
  if repo_type == "model":
39
  repo_type = None
40
  for f in files:
41
- path_in_repo = root.split("/")
 
42
  upload_file(os.path.join(local_dir, path_in_repo, f), f, dst_repo, token=token, repo_type=repo_type, path_in_repo=path_in_repo)
43
 
44
  # Clean up to be nice with the environment
 
38
  if repo_type == "model":
39
  repo_type = None
40
  for f in files:
41
+ directories_list = root.split("/")
42
+ path_in_repo = "/".join(directories_list[1:])
43
  upload_file(os.path.join(local_dir, path_in_repo, f), f, dst_repo, token=token, repo_type=repo_type, path_in_repo=path_in_repo)
44
 
45
  # Clean up to be nice with the environment