Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -10,7 +10,7 @@ ENDPOINT = "https://huggingface.co"
|
|
10 |
REPO_TYPES = ["model", "dataset", "space"]
|
11 |
|
12 |
|
13 |
-
def duplicate(oauth_token: gr.OAuthToken | None,source_repo, dst_repo, repo_type, private):
|
14 |
try:
|
15 |
if not repo_type in REPO_TYPES:
|
16 |
raise ValueError("need to select valid repo type")
|
@@ -52,10 +52,12 @@ interface = gr.Interface(
|
|
52 |
placeholder="Source repository (e.g. osanseviero/src)",
|
53 |
search_type=["model", "dataset", "space"],
|
54 |
sumbit_on_select=False,
|
|
|
|
|
55 |
),
|
56 |
-
gr.Textbox(placeholder="Destination repository (e.g. osanseviero/dst)"),
|
57 |
-
gr.Dropdown(choices=REPO_TYPES, value="model"),
|
58 |
-
gr.Checkbox(label="Make new repo private?"),
|
59 |
],
|
60 |
outputs=[
|
61 |
gr.Markdown(label="output"),
|
|
|
10 |
REPO_TYPES = ["model", "dataset", "space"]
|
11 |
|
12 |
|
13 |
+
def duplicate(oauth_token: gr.OAuthToken | None, source_repo, dst_repo, repo_type, private):
|
14 |
try:
|
15 |
if not repo_type in REPO_TYPES:
|
16 |
raise ValueError("need to select valid repo type")
|
|
|
52 |
placeholder="Source repository (e.g. osanseviero/src)",
|
53 |
search_type=["model", "dataset", "space"],
|
54 |
sumbit_on_select=False,
|
55 |
+
label="source_repo",
|
56 |
+
|
57 |
),
|
58 |
+
gr.Textbox(placeholder="Destination repository (e.g. osanseviero/dst)", label="dst_repo"),
|
59 |
+
gr.Dropdown(choices=REPO_TYPES, value="model", label="repo_type"),
|
60 |
+
gr.Checkbox(label="Make new repo private?", label="private"),
|
61 |
],
|
62 |
outputs=[
|
63 |
gr.Markdown(label="output"),
|