UI-layout-optimizer / openenv_core.py
Kolaps27's picture
chore: final code refactoring for portability and robustness
0e5f237
raw
history blame contribute delete
589 Bytes
from __future__ import annotations
from fastapi import FastAPI
def create_app(env_cls, action_model, observation_model) -> FastAPI:
"""Minimal local compatibility layer for this project.
The upstream package offers a richer OpenEnv integration, but this repo
only relies on receiving a FastAPI app instance to extend with routes.
"""
app = FastAPI()
app.state.env_cls = env_cls
app.state.action_model = action_model
app.state.observation_model = observation_model
return app
def validate() -> None:
from validate_local import main
main()