| """ | |
| main.py — entry point | |
| Run with: python main.py | |
| """ | |
| import sys | |
| from pathlib import Path | |
| # Ensure the project root is on sys.path so `core`, `ui`, `config` are importable | |
| # regardless of where Python is invoked from. | |
| ROOT = Path(__file__).resolve().parent | |
| if str(ROOT) not in sys.path: | |
| sys.path.insert(0, str(ROOT)) | |
| from ui.app import build_ui | |
| if __name__ == "__main__": | |
| demo = build_ui() | |
| demo.launch(server_name="0.0.0.0", server_port=7860, show_error=True) | |