Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -83,25 +83,10 @@ def swap_ckpt_vae(ckpt_name):
|
|
83 |
|
84 |
def push_pt(model_to, token, branch):
|
85 |
try:
|
86 |
-
|
87 |
-
|
88 |
-
|
89 |
-
|
90 |
-
finally:
|
91 |
-
if repo_exists:
|
92 |
-
print(r_info)
|
93 |
-
else:
|
94 |
-
create_repo(model_to, private=True, token=token)
|
95 |
-
try:
|
96 |
-
branch_exists = True
|
97 |
-
b_info = model_info(model_to, revision=branch, token=token)
|
98 |
-
except RevisionNotFoundError:
|
99 |
-
branch_exists = False
|
100 |
-
finally:
|
101 |
-
if branch_exists:
|
102 |
-
print(b_info)
|
103 |
-
else:
|
104 |
-
create_branch(model_to, branch=branch, token=token)
|
105 |
upload_folder(folder_path="pt", path_in_repo="", revision=branch, repo_id=model_to, commit_message=f"pt - camenduru/converter", token=token)
|
106 |
return "push pt done!"
|
107 |
|
|
|
83 |
|
84 |
def push_pt(model_to, token, branch):
|
85 |
try:
|
86 |
+
create_repo(model_to, private=True, token=token)
|
87 |
+
except:
|
88 |
+
print("repo already exists, overwriting...")
|
89 |
+
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
90 |
upload_folder(folder_path="pt", path_in_repo="", revision=branch, repo_id=model_to, commit_message=f"pt - camenduru/converter", token=token)
|
91 |
return "push pt done!"
|
92 |
|