Spaces:
Running
Running
osanseviero
commited on
Commit
•
41c301c
1
Parent(s):
88ea3ec
Update app.py
Browse files
app.py
CHANGED
@@ -6,7 +6,7 @@ import os, shutil
|
|
6 |
def duplicate(source_repo, dst_repo, token, repo_type):
|
7 |
# Creating repos has inconsistent API (https://github.com/huggingface/huggingface_hub/issues/47)
|
8 |
repo_namespace, dst_id = dst_repo.split("/")
|
9 |
-
username = whoami(token)
|
10 |
org = None
|
11 |
if repo_namespace != username:
|
12 |
org = repo_namespace
|
|
|
6 |
def duplicate(source_repo, dst_repo, token, repo_type):
|
7 |
# Creating repos has inconsistent API (https://github.com/huggingface/huggingface_hub/issues/47)
|
8 |
repo_namespace, dst_id = dst_repo.split("/")
|
9 |
+
username = whoami(token)["name"]
|
10 |
org = None
|
11 |
if repo_namespace != username:
|
12 |
org = repo_namespace
|