File size: 796 Bytes
7ee2a84
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
"""Run the interface without loading the AI models (for work on tabs that do not need them: formatter, finder,
pricing, account). Humanizing and detection load their models on first use, so they are slow or fail on a small PC.
    python devtools/run_ui_only.py"""
import os
import runpy
import sys
import tempfile
from pathlib import Path

ROOT = Path(__file__).resolve().parent.parent
sys.path.insert(0, str(ROOT))
sys.path.insert(0, str(Path(__file__).resolve().parent))
import env  # noqa: E402

env.load()
os.environ.update(SKIP_MODEL_LOAD="1", LEXSUB="0", LT_MODE="off")
os.environ.setdefault("USERS_DB", str(Path(tempfile.gettempdir()) / "cs_suite_dev_users.db"))
os.environ.setdefault("GRADIO_SERVER_PORT", "7860")
os.chdir(ROOT)
runpy.run_path(str(ROOT / "app.py"), run_name="__main__")