CoolFace
Apppublic

build-small-hackathon/Off-Grid-Field-Repair-Logbook

sourceHugging Faceupdated 3mo agoView on Hugging Face
1likes
app.py26 linesDownload Raw Back to root
1from __future__ import annotations2 3import sys4from pathlib import Path5import os6 7# Disable Gradio auto-reload watchdog in HF Spaces to prevent port collisions8os.environ.pop("GRADIO_WATCH_DIRS", None)9 10ROOT_DIR = Path(__file__).resolve().parent11ROOT_DIR_STR = str(ROOT_DIR)12if ROOT_DIR_STR in sys.path:13    sys.path.remove(ROOT_DIR_STR)14sys.path.insert(0, ROOT_DIR_STR)15 16 17def main() -> int:18    from app_kit.app import main as _main19 20    result = _main()21    return int(result or 0)22 23 24if __name__ == '__main__':25    raise SystemExit(main())26