algorithm_service.py 695 B

12345678910111213141516171819
  1. # -*- coding: utf-8 -*-
  2. r"""算法服务入口(P10):`python scripts/algorithm_service.py --host 127.0.0.1 --port 18050`。
  3. 放在 `scripts/` 是沿用本仓"服务入口在 scripts/"的约定(与 `static_server.py`、`windscada_serve.py` 一致);
  4. **实现**在 `app_algorithmModel/app_algorithmModel_guanlan/service/`(模块化后的归属)。
  5. """
  6. from __future__ import annotations
  7. import pathlib
  8. import sys
  9. ROOT = pathlib.Path(__file__).resolve().parents[1]
  10. if str(ROOT) not in sys.path:
  11. sys.path.insert(0, str(ROOT))
  12. from app_algorithmModel.app_algorithmModel_guanlan.service.app import main # noqa: E402
  13. if __name__ == '__main__':
  14. raise SystemExit(main())