Update app.py
Browse files
app.py
CHANGED
|
@@ -101,11 +101,13 @@ def archive_repo(token, repo_id, archive_repo, manage_repo_type_state):
|
|
| 101 |
try:
|
| 102 |
api = get_hf_api(token)
|
| 103 |
archive_space=f'{archive_repo}/{repo_id.split("/")[1]}'
|
|
|
|
| 104 |
api.move_repo(from_id=repo_id, to_id=archive_space, repo_type=manage_repo_type_state)
|
| 105 |
gr.Info(f"Successfully moved to '{archive_space}'.")
|
| 106 |
return None, gr.update(visible=False), gr.update(visible=False)
|
| 107 |
except HfHubHTTPError as e:
|
| 108 |
gr.Error(f"Failed to archive repository: {e}")
|
|
|
|
| 109 |
return repo_id, gr.update(visible=True), gr.update(visible=False)
|
| 110 |
# --- File Management Functions ---
|
| 111 |
|
|
|
|
| 101 |
try:
|
| 102 |
api = get_hf_api(token)
|
| 103 |
archive_space=f'{archive_repo}/{repo_id.split("/")[1]}'
|
| 104 |
+
print(f'moving from {repo_id} to {archive_space}')
|
| 105 |
api.move_repo(from_id=repo_id, to_id=archive_space, repo_type=manage_repo_type_state)
|
| 106 |
gr.Info(f"Successfully moved to '{archive_space}'.")
|
| 107 |
return None, gr.update(visible=False), gr.update(visible=False)
|
| 108 |
except HfHubHTTPError as e:
|
| 109 |
gr.Error(f"Failed to archive repository: {e}")
|
| 110 |
+
print(e)
|
| 111 |
return repo_id, gr.update(visible=True), gr.update(visible=False)
|
| 112 |
# --- File Management Functions ---
|
| 113 |
|