Edwin Salguero commited on
Commit ·
2cebf25
1
Parent(s): b93b70d
Fix streamlit_app.py to properly use imported main() function instead of always overriding with fallback
Browse files16 unmodified lines17181920212215 unmodified lines3839404116 unmodified linesif current_dir not in sys.path:sys.path.insert(0, current_dir)try:# Import only the main function to avoid loading unnecessary modulesfrom frontend.app import main15 unmodified lines# Run the main function directlyif __name__ == "__main__":main()16 unmodified lines171819202122232415 unmodified lines40414243444546474816 unmodified linesif current_dir not in sys.path:sys.path.insert(0, current_dir)main = None # Initialize main as Nonetry:# Import only the main function to avoid loading unnecessary modulesfrom frontend.app import main15 unmodified lines# Run the main function directlyif __name__ == "__main__":if main is not None:main()else:import streamlit as stst.error("Failed to import main application. Please check the deployment.")st.info("Contact support if this issue persists.")
streamlit_app.py+8-1