File size: 660 Bytes
4433dc8 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 | from __future__ import annotations
try:
from openenv.core.env_server.http_server import create_app
except Exception as exc: # pragma: no cover
raise ImportError(
"openenv-core>=0.2.3 is required. Install with: pip install -e ."
) from exc
from env.adapt_env import AdaptEnvironment
from models import AdaptAction, AdaptObservation
app = create_app(
AdaptEnvironment,
AdaptAction,
AdaptObservation,
env_name="adapt_dsa_tutor",
max_concurrent_envs=4,
)
def main(host: str = "0.0.0.0", port: int = 7860) -> None:
import uvicorn
uvicorn.run(app, host=host, port=port)
if __name__ == "__main__":
main()
|