broadfield-dev commited on
Commit
2bdd8a9
·
verified ·
1 Parent(s): fca0388

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -4
app.py CHANGED
@@ -729,7 +729,6 @@ def handle_confirm_changes(hf_api_key, owner_name, space_name, changeset):
729
  status_message = build_logic_delete_space(hf_api_key, delete_owner, delete_space)
730
  final_overall_status = status_message
731
  if "Successfully" in status_message:
732
- global parsed_code_blocks_state_cache
733
  parsed_code_blocks_state_cache = []
734
  _formatted, _detected, _download = _generate_ui_outputs_from_cache(None, None)
735
  owner_update = gr.update(value="")
@@ -1326,7 +1325,7 @@ def handle_manual_duplicate_space(hf_api_key_ui, source_owner, source_space_name
1326
  if "/" in target_space_name:
1327
  return "Duplicate Error: Target Space Name should not contain '/'. Use Target Owner field for the owner part.", gr.update(), gr.update(), gr.update(), gr.update(), gr.update(), gr.update(), gr.update(), gr.update()
1328
 
1329
-
1330
  source_repo_id = f"{source_owner}/{source_space_name}"
1331
  target_repo_id = f"{target_owner}/{target_space_name}"
1332
 
@@ -1347,7 +1346,7 @@ def handle_manual_duplicate_space(hf_api_key_ui, source_owner, source_space_name
1347
 
1348
  if err_list:
1349
  reload_error = f"Error reloading file list after duplication: {err_list}"
1350
- global parsed_code_blocks_state_cache
1351
  parsed_code_blocks_state_cache = []
1352
  _file_browser_update = gr.update(visible=False, choices=[], value=None)
1353
  _iframe_html_update = gr.update(value=None, visible=False)
@@ -1359,7 +1358,6 @@ def handle_manual_duplicate_space(hf_api_key_ui, source_owner, source_space_name
1359
  is_binary = lang == "binary" or (err_get is not None)
1360
  code = f"[Error loading content: {err_get}]" if err_get else (content or "")
1361
  loaded_files.append({"filename": file_path, "code": code, "language": lang, "is_binary": is_binary, "is_structure_block": False})
1362
- global parsed_code_blocks_state_cache
1363
  parsed_code_blocks_state_cache = loaded_files
1364
 
1365
  _file_browser_update = gr.update(visible=True, choices=sorted([f["filename"] for f in parsed_code_blocks_state_cache if not f.get("is_structure_block")] or []), value=None)
 
729
  status_message = build_logic_delete_space(hf_api_key, delete_owner, delete_space)
730
  final_overall_status = status_message
731
  if "Successfully" in status_message:
 
732
  parsed_code_blocks_state_cache = []
733
  _formatted, _detected, _download = _generate_ui_outputs_from_cache(None, None)
734
  owner_update = gr.update(value="")
 
1325
  if "/" in target_space_name:
1326
  return "Duplicate Error: Target Space Name should not contain '/'. Use Target Owner field for the owner part.", gr.update(), gr.update(), gr.update(), gr.update(), gr.update(), gr.update(), gr.update(), gr.update()
1327
 
1328
+ global parsed_code_blocks_state_cache
1329
  source_repo_id = f"{source_owner}/{source_space_name}"
1330
  target_repo_id = f"{target_owner}/{target_space_name}"
1331
 
 
1346
 
1347
  if err_list:
1348
  reload_error = f"Error reloading file list after duplication: {err_list}"
1349
+
1350
  parsed_code_blocks_state_cache = []
1351
  _file_browser_update = gr.update(visible=False, choices=[], value=None)
1352
  _iframe_html_update = gr.update(value=None, visible=False)
 
1358
  is_binary = lang == "binary" or (err_get is not None)
1359
  code = f"[Error loading content: {err_get}]" if err_get else (content or "")
1360
  loaded_files.append({"filename": file_path, "code": code, "language": lang, "is_binary": is_binary, "is_structure_block": False})
 
1361
  parsed_code_blocks_state_cache = loaded_files
1362
 
1363
  _file_browser_update = gr.update(visible=True, choices=sorted([f["filename"] for f in parsed_code_blocks_state_cache if not f.get("is_structure_block")] or []), value=None)