import os import runpy import sys APP_DIR = os.path.dirname(os.path.abspath(__file__)) DEMO_DIR = os.path.join(APP_DIR, "inverse_design_demo") DEMO_APP = os.path.join(DEMO_DIR, "app.py") # Execute the original Streamlit script in this process. if DEMO_DIR not in sys.path: sys.path.insert(0, DEMO_DIR) os.chdir(DEMO_DIR) runpy.run_path(DEMO_APP, run_name="__main__")