"""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__")