Spaces:
Sleeping
Sleeping
Efreak
commited on
fixes spaces. Stupid python
Browse files
app.py
CHANGED
|
@@ -47,12 +47,12 @@ def duplicate(source_url, dst_repo, token, new_name, dst_repo_path, repo_type):
|
|
| 47 |
os.remove(dir+files[0])
|
| 48 |
os.rmdir(dir)
|
| 49 |
match repo_type:
|
| 50 |
-
|
| 51 |
-
|
| 52 |
-
|
| 53 |
-
|
| 54 |
-
|
| 55 |
-
|
| 56 |
return (
|
| 57 |
f'Find your repo <a href=\'{repo_url}\' target="_blank" style="text-decoration:underline">here</a>',
|
| 58 |
"sp.jpg",
|
|
|
|
| 47 |
os.remove(dir+files[0])
|
| 48 |
os.rmdir(dir)
|
| 49 |
match repo_type:
|
| 50 |
+
case "space":
|
| 51 |
+
repo_url=f"https://hf.co/spaces/{dst_repo}"
|
| 52 |
+
case "dataset":
|
| 53 |
+
repo_url=f"https://hf.co/datasets/{dst_repo}"
|
| 54 |
+
case "model":
|
| 55 |
+
repo_url=f"https://hf.co/{dst_repo}"
|
| 56 |
return (
|
| 57 |
f'Find your repo <a href=\'{repo_url}\' target="_blank" style="text-decoration:underline">here</a>',
|
| 58 |
"sp.jpg",
|