gauravnetes's picture
Fix import error for env module
2ac52e1
Raw History Blame Contribute Delete
553 Bytes
import os
import sys
sys.path.insert(0, os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
from fastapi import FastAPI
from openenv.core.env_server.http_server import create_app
from env.environment import DataCleaningEnv
from env.models import Action, Observation
# Create the FastAPI app
app = create_app(
DataCleaningEnv,
Action,
Observation,
env_name="datacleaning-env",
max_concurrent_envs=1,
)
def main():
import uvicorn
uvicorn.run(app, host="0.0.0.0", port=7860)
if __name__ == "__main__":
main()