runner-game / server /app.py
Boobesh007's picture
Upload server/app.py with huggingface_hub
f82de66 verified
Raw History Blame Contribute Delete
554 Bytes
import sys
import os
sys.path.insert(0, os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
from openenv.core.env_server.http_server import create_app
from models import RunnerAction, RunnerObservation
from server.my_env_environment import MyEnvironment
app = create_app(
MyEnvironment,
RunnerAction,
RunnerObservation,
env_name="runner_game",
max_concurrent_envs=10,
)
def main(host: str = "0.0.0.0", port: int = 8000):
import uvicorn
uvicorn.run(app, host=host, port=port)
if __name__ == "__main__":
main()