Spaces:
Runtime error
Runtime error
| from __future__ import annotations | |
| import sys | |
| from pathlib import Path | |
| import os | |
| # Disable Gradio auto-reload watchdog in HF Spaces to prevent port collisions | |
| os.environ.pop("GRADIO_WATCH_DIRS", None) | |
| ROOT_DIR = Path(__file__).resolve().parent | |
| ROOT_DIR_STR = str(ROOT_DIR) | |
| if ROOT_DIR_STR in sys.path: | |
| sys.path.remove(ROOT_DIR_STR) | |
| sys.path.insert(0, ROOT_DIR_STR) | |
| def main() -> int: | |
| from app_kit.app import main as _main | |
| result = _main() | |
| return int(result or 0) | |
| if __name__ == '__main__': | |
| raise SystemExit(main()) | |