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