Spaces:
Runtime error
Runtime error
Efreak
commited on
Commit
•
25ff2a0
1
Parent(s):
5e8bac7
fix slashes
Browse files
app.py
CHANGED
@@ -32,9 +32,9 @@ def duplicate(source_url, dst_repo, token, new_name, dst_repo_path, repo_type):
|
|
32 |
files=os.listdir(dir)
|
33 |
|
34 |
if new_name:
|
35 |
-
dst_repo_path=dst_repo_path+new_name
|
36 |
else:
|
37 |
-
dst_repo_path=dst_repo_path+files[0]
|
38 |
|
39 |
api.upload_file(
|
40 |
path_or_fileobj=dir+files[0],
|
@@ -84,7 +84,7 @@ interface = gr.Interface(
|
|
84 |
gr.Textbox(placeholder="Destination repository (e.g. osanseviero/dst)"),
|
85 |
gr.Textbox(placeholder="Write access token", type="password"),
|
86 |
gr.Textbox(placeholder="Post-download name of your file, if you want it changed (e.g. stupidmodel.safetensors)"),
|
87 |
-
gr.Textbox(placeholder="Destination for your file within your repo. Don't include the filename
|
88 |
gr.Dropdown(choices=REPO_TYPES, value="model"),
|
89 |
],
|
90 |
outputs=[
|
|
|
32 |
files=os.listdir(dir)
|
33 |
|
34 |
if new_name:
|
35 |
+
dst_repo_path=dst_repo_path.strip("/")+"/"+new_name.strip("/")
|
36 |
else:
|
37 |
+
dst_repo_path=dst_repo_path.strip("/")+"/"+files[0]
|
38 |
|
39 |
api.upload_file(
|
40 |
path_or_fileobj=dir+files[0],
|
|
|
84 |
gr.Textbox(placeholder="Destination repository (e.g. osanseviero/dst)"),
|
85 |
gr.Textbox(placeholder="Write access token", type="password"),
|
86 |
gr.Textbox(placeholder="Post-download name of your file, if you want it changed (e.g. stupidmodel.safetensors)"),
|
87 |
+
gr.Textbox(placeholder="Destination for your file within your repo. Don't include the filename (e.g. /models/Stable-diffusion/)"),
|
88 |
gr.Dropdown(choices=REPO_TYPES, value="model"),
|
89 |
],
|
90 |
outputs=[
|