Spaces:
Runtime error
Runtime error
| """FastAPI application for the Executive Assistant Arena Environment.""" | |
| try: | |
| from openenv.core.env_server.http_server import create_app | |
| except Exception as e: | |
| raise ImportError( | |
| "openenv is required. Install with: pip install 'openenv-core[core]>=0.2.1'" | |
| ) from e | |
| from models import AssistantAction, AssistantObservation | |
| from .exec_assistant_arena_environment import ExecAssistantArenaEnvironment | |
| app = create_app( | |
| ExecAssistantArenaEnvironment, | |
| AssistantAction, | |
| AssistantObservation, | |
| env_name="exec_assistant_arena", | |
| max_concurrent_envs=5, | |
| ) | |
| def main(host: str = "0.0.0.0", port: int = 8000): | |
| import uvicorn | |
| uvicorn.run(app, host=host, port=port) | |
| if __name__ == "__main__": | |
| import argparse | |
| parser = argparse.ArgumentParser() | |
| parser.add_argument("--port", type=int, default=8000) | |
| args = parser.parse_args() | |
| main(port=args.port) | |