Spaces:
Running
Running
File size: 543 Bytes
e9015b1 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 | """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()
|