Update app.py
Browse files
app.py
CHANGED
@@ -830,6 +830,8 @@ def handle_build_space_button(hf_api_key_ui, ui_space_name_part, ui_owner_name_p
|
|
830 |
_build_status = f"Manual Build Process: {result_message}"
|
831 |
|
832 |
if "Successfully" in result_message:
|
|
|
|
|
833 |
owner_to_use = ui_owner_name_part # Assume determined correctly by build_logic_create_space
|
834 |
space_to_use = ui_space_name_part
|
835 |
|
@@ -838,12 +840,10 @@ def handle_build_space_button(hf_api_key_ui, ui_space_name_part, ui_owner_name_p
|
|
838 |
sdk_built, file_list, err_list = get_space_repository_info(hf_api_key_ui, space_to_use, owner_to_use)
|
839 |
if err_list:
|
840 |
_build_status += f" | Error reloading file list after build: {err_list}"
|
841 |
-
global parsed_code_blocks_state_cache
|
842 |
parsed_code_blocks_state_cache = [] # Clear cache
|
843 |
_file_browser_update = gr.update(visible=False, choices=[], value=None)
|
844 |
_iframe_html = gr.update(value=None, visible=False)
|
845 |
else:
|
846 |
-
global parsed_code_blocks_state_cache
|
847 |
loaded_files = []
|
848 |
for file_path in file_list:
|
849 |
content, err_get = get_space_file_content(hf_api_key_ui, space_to_use, owner_to_use, file_path)
|
|
|
830 |
_build_status = f"Manual Build Process: {result_message}"
|
831 |
|
832 |
if "Successfully" in result_message:
|
833 |
+
global parsed_code_blocks_state_cache
|
834 |
+
|
835 |
owner_to_use = ui_owner_name_part # Assume determined correctly by build_logic_create_space
|
836 |
space_to_use = ui_space_name_part
|
837 |
|
|
|
840 |
sdk_built, file_list, err_list = get_space_repository_info(hf_api_key_ui, space_to_use, owner_to_use)
|
841 |
if err_list:
|
842 |
_build_status += f" | Error reloading file list after build: {err_list}"
|
|
|
843 |
parsed_code_blocks_state_cache = [] # Clear cache
|
844 |
_file_browser_update = gr.update(visible=False, choices=[], value=None)
|
845 |
_iframe_html = gr.update(value=None, visible=False)
|
846 |
else:
|
|
|
847 |
loaded_files = []
|
848 |
for file_path in file_list:
|
849 |
content, err_get = get_space_file_content(hf_api_key_ui, space_to_use, owner_to_use, file_path)
|