Spaces:
Sleeping

RLhackathon / server /app.py
varun1235's picture
Claude Opus 4.6 (1M context)
Enable openenv-core web UI and add root health check
cad3790
Raw History Blame Contribute Delete
901 Bytes
"""
server/app.py
OpenEnv-core server with auto-generated UI.
"""
import sys
import os
import uvicorn
# Add project root to path so imports work when run as module
sys.path.insert(0, os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
# Enable web interface for Gradio UI
os.environ.setdefault("ENABLE_WEB_INTERFACE", "true")
from openenv.core.env_server.http_server import create_app
from env.environment import ISSEnvironment
from env.objects import Action, Observation
app = create_app(
ISSEnvironment,
Action,
Observation,
env_name="iss-safety-operations",
max_concurrent_envs=1,
)
# Add root health check (openenv-core only provides /health)
@app.get("/")
def health():
return {"status": "ok", "environment": "iss-safety-operations", "version": "1.0.0"}
def main():
uvicorn.run(app, host="0.0.0.0", port=7860)
if __name__ == "__main__":
main()