Spaces:
Runtime error
Runtime error
osanseviero
commited on
Commit
•
2f5a34e
1
Parent(s):
0dcf350
Update app.py
Browse files
app.py
CHANGED
@@ -65,6 +65,10 @@ def fork(source_repo, dst_repo, token, repo_type):
|
|
65 |
os.unlink(file_path)
|
66 |
elif os.path.isdir(file_path):
|
67 |
shutil.rmtree(file_path)
|
|
|
|
|
|
|
|
|
68 |
return endpoint + "/" + dst_repo
|
69 |
|
70 |
interface = gr.Interface(
|
@@ -76,6 +80,7 @@ interface = gr.Interface(
|
|
76 |
gr.inputs.Dropdown(choices=["model", "dataset", "space"])
|
77 |
],
|
78 |
outputs=["textbox"],
|
|
|
79 |
description="Find your write token at https://huggingface.co/settings/token",
|
80 |
allow_flagging=False,
|
81 |
live=False,
|
|
|
65 |
os.unlink(file_path)
|
66 |
elif os.path.isdir(file_path):
|
67 |
shutil.rmtree(file_path)
|
68 |
+
|
69 |
+
# Same as above...
|
70 |
+
if repo_type in ["space", "dataset"]:
|
71 |
+
endpoint += "s"
|
72 |
return endpoint + "/" + dst_repo
|
73 |
|
74 |
interface = gr.Interface(
|
|
|
80 |
gr.inputs.Dropdown(choices=["model", "dataset", "space"])
|
81 |
],
|
82 |
outputs=["textbox"],
|
83 |
+
title="Fork your repo!",
|
84 |
description="Find your write token at https://huggingface.co/settings/token",
|
85 |
allow_flagging=False,
|
86 |
live=False,
|