Spaces:
Running
Running
File size: 591 Bytes
fd10391 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 | 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 CodeReviewAction, CodeReviewObservation
from server.code_review_environment import CodeReviewEnvironment
app = create_app(
CodeReviewEnvironment,
CodeReviewAction,
CodeReviewObservation,
env_name="code_review",
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()
|