File size: 609 Bytes
3b1742d
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
"""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()