| 123456789101112131415161718192021222324 |
- # -*- coding: utf-8 -*-
- import os
- import uvicorn
- from digitalHuman.engine import EnginePool
- from digitalHuman.agent import AgentPool
- from digitalHuman.server import app
- from digitalHuman.utils import config
- __all__ = ["runServer"]
- def runServer():
- enginePool = EnginePool()
- enginePool.setup(config.SERVER.ENGINES)
- agentPool = AgentPool()
- agentPool.setup(config.SERVER.AGENTS)
-
- # 后端使用 HTTP 模式(前端使用 HTTPS)
- uvicorn.run(
- app,
- host=config.SERVER.IP,
- port=config.SERVER.PORT,
- log_level="info"
- )
|