Launch classic Streamlit UI
()
| 367 | |
| 368 | |
| 369 | def launch_classic_ui(): |
| 370 | """Launch classic Streamlit UI""" |
| 371 | import importlib.util |
| 372 | |
| 373 | print("๐ Launching Classic Streamlit UI...") |
| 374 | |
| 375 | # Check if Streamlit is installed |
| 376 | if importlib.util.find_spec("streamlit") is None: |
| 377 | print("โ Streamlit is not installed.") |
| 378 | print("Install with: pip install streamlit") |
| 379 | sys.exit(1) |
| 380 | |
| 381 | current_dir = Path(__file__).parent |
| 382 | streamlit_app_path = current_dir / "ui" / "streamlit_app.py" |
| 383 | |
| 384 | if not streamlit_app_path.exists(): |
| 385 | print(f"โ Streamlit app not found: {streamlit_app_path}") |
| 386 | sys.exit(1) |
| 387 | |
| 388 | print(f"๐ UI App: {streamlit_app_path}") |
| 389 | print("๐ Launching on http://localhost:8501") |
| 390 | print("=" * 70) |
| 391 | |
| 392 | try: |
| 393 | cmd = [ |
| 394 | sys.executable, |
| 395 | "-m", |
| 396 | "streamlit", |
| 397 | "run", |
| 398 | str(streamlit_app_path), |
| 399 | "--server.port", |
| 400 | "8501", |
| 401 | "--server.address", |
| 402 | "localhost", |
| 403 | "--browser.gatherUsageStats", |
| 404 | "false", |
| 405 | ] |
| 406 | subprocess.run(cmd, check=True) |
| 407 | except KeyboardInterrupt: |
| 408 | print("\n\n๐ Streamlit server stopped by user") |
| 409 | except Exception as e: |
| 410 | print(f"\nโ Error: {e}") |
| 411 | sys.exit(1) |
| 412 | |
| 413 | |
| 414 | def _check_docker_prerequisites(): |