Spaces:
Sleeping
Sleeping
osanseviero
commited on
Commit
•
deca531
1
Parent(s):
dba25da
Update app.py
Browse files
app.py
CHANGED
@@ -40,7 +40,11 @@ def duplicate(source_repo, dst_repo, token, repo_type):
|
|
40 |
for f in files:
|
41 |
directories_list = root.split("/")
|
42 |
path_in_repo = "/".join(directories_list[1:])
|
43 |
-
|
|
|
|
|
|
|
|
|
44 |
|
45 |
# Clean up to be nice with the environment
|
46 |
for filename in os.listdir(local_dir):
|
|
|
40 |
for f in files:
|
41 |
directories_list = root.split("/")
|
42 |
path_in_repo = "/".join(directories_list[1:])
|
43 |
+
if path in repo:
|
44 |
+
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)
|
45 |
+
else:
|
46 |
+
upload_file(os.path.join(local_dir, path_in_repo, f), f, dst_repo, token=token, repo_type=repo_type)
|
47 |
+
|
48 |
|
49 |
# Clean up to be nice with the environment
|
50 |
for filename in os.listdir(local_dir):
|