"""Entrypoint cho HF Space — gọi app trong src/. HF Space chạy file app.py ở root. App thật nằm trong src/ (dùng import phẳng như `import translator`), nên thêm src/ vào sys.path rồi gọi main(). Phát hiện Space qua SPACE_ID (đã xử lý trong src/app.py: ẩn nút GPU/torch, bỏ PID file, để HF tự lo host/port). """ import sys from pathlib import Path SRC = Path(__file__).resolve().parent / "src" sys.path.insert(0, str(SRC)) import app as _app # noqa: E402 if __name__ == "__main__": _app.main()