Spaces:
Running
Running
Commit
·
f318ad6
1
Parent(s):
94b16f3
Update app.py
Browse files
app.py
CHANGED
@@ -303,12 +303,15 @@ def upload_civit_to_hf(profile: Optional[gr.OAuthProfile], url, link_civit=False
|
|
303 |
create_readme(info, downloaded_files, user_repo_id, link_civit, folder=folder)
|
304 |
try:
|
305 |
repo_id = f"{username}/{profile.preferred_username}-{slug_name}"
|
|
|
306 |
api.create_repo(repo_id=repo_id, private=True, exist_ok=True)
|
|
|
307 |
api.upload_folder(
|
308 |
folder_path=folder,
|
309 |
repo_id=repo_id,
|
310 |
repo_type="model",
|
311 |
)
|
|
|
312 |
api.update_repo_visibility(repo_id=repo_id, private=False)
|
313 |
except:
|
314 |
raise gr.Error("uploading the repo went wrong")
|
|
|
303 |
create_readme(info, downloaded_files, user_repo_id, link_civit, folder=folder)
|
304 |
try:
|
305 |
repo_id = f"{username}/{profile.preferred_username}-{slug_name}"
|
306 |
+
print("Creating repo...")
|
307 |
api.create_repo(repo_id=repo_id, private=True, exist_ok=True)
|
308 |
+
print("Uploading repo...")
|
309 |
api.upload_folder(
|
310 |
folder_path=folder,
|
311 |
repo_id=repo_id,
|
312 |
repo_type="model",
|
313 |
)
|
314 |
+
print("Changing repo visibility...")
|
315 |
api.update_repo_visibility(repo_id=repo_id, private=False)
|
316 |
except:
|
317 |
raise gr.Error("uploading the repo went wrong")
|