"""Hugging Face Spaces and local entry point.""" import os import sys from pathlib import Path # A local checkout can launch with `python app.py` after its .venv is installed. if __name__ == "__main__": project_venv = Path(__file__).resolve().parent / ".venv" local_python = project_venv / "bin" / "python" if local_python.exists() and Path(sys.prefix).resolve() != project_venv.resolve(): os.execv(str(local_python), [str(local_python), str(Path(__file__).resolve()), *sys.argv[1:]]) from dashboard.ui import build_app demo = build_app() if __name__ == "__main__": demo.launch()