broadfield-dev commited on
Commit
5f477f6
·
verified ·
1 Parent(s): 8959513

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -101,9 +101,9 @@ def archive_repo(token, repo_id, archive_repo):
101
  try:
102
  api = get_hf_api(token)
103
  archive_space=f'{archive_repo}/{repo_id.split("/")[1]}'
104
- api.move_repo(repo_id, archive_space)
105
  gr.Info(f"Successfully moved to '{archive_space}'.")
106
- return gr.update(), 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)
 
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)
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)