Spaces:
Runtime error
Runtime error
osanseviero
commited on
Commit
•
4e6838c
1
Parent(s):
45d62c0
Update app.py
Browse files
app.py
CHANGED
@@ -25,7 +25,12 @@ def fork(source_repo, dst_repo, token, repo_type):
|
|
25 |
endpoint += repo_type
|
26 |
full_path = endpoint + "/" + source_repo
|
27 |
local_dir = "hub/" + source_repo
|
28 |
-
|
|
|
|
|
|
|
|
|
|
|
29 |
|
30 |
# Change remote origin
|
31 |
command = f"git remote set-url origin https://user:{token}@huggingface.co/"
|
|
|
25 |
endpoint += repo_type
|
26 |
full_path = endpoint + "/" + source_repo
|
27 |
local_dir = "hub/" + source_repo
|
28 |
+
|
29 |
+
if repo_type in ["spaces", "dataset"]:
|
30 |
+
# Same as above
|
31 |
+
repo = Repository(local_dir=local_dir, clone_from=full_path, repo_type=repo_type)
|
32 |
+
else:
|
33 |
+
repo = Repository(local_dir=local_dir, clone_from=full_path)
|
34 |
|
35 |
# Change remote origin
|
36 |
command = f"git remote set-url origin https://user:{token}@huggingface.co/"
|