arjeet commited on
Commit
f0639ce
·
1 Parent(s): de5eb3d

server update

Browse files
Files changed (1) hide show
  1. server/app.py +6 -3
server/app.py CHANGED
@@ -7,6 +7,7 @@
7
  """FastAPI application for the Doc Sweeper Environment."""
8
 
9
  from openenv.core.env_server import create_app
 
10
 
11
  from models import DocAction, DocObservation
12
  from .cust_env_environment import DocSweeperEnvironment
@@ -15,7 +16,9 @@ from .cust_env_environment import DocSweeperEnvironment
15
  # Pass the class (factory) instead of an instance for WebSocket session support
16
  app = create_app(DocSweeperEnvironment, DocAction, DocObservation, env_name="doc_sweeper")
17
 
18
- if __name__ == "__main__":
19
- import uvicorn
 
20
 
21
- uvicorn.run(app, host="0.0.0.0", port=8000)
 
 
7
  """FastAPI application for the Doc Sweeper Environment."""
8
 
9
  from openenv.core.env_server import create_app
10
+ import uvicorn
11
 
12
  from models import DocAction, DocObservation
13
  from .cust_env_environment import DocSweeperEnvironment
 
16
  # Pass the class (factory) instead of an instance for WebSocket session support
17
  app = create_app(DocSweeperEnvironment, DocAction, DocObservation, env_name="doc_sweeper")
18
 
19
+ def main():
20
+ """Entry point for the OpenEnv multi-mode deployment."""
21
+ uvicorn.run("server.app:app", host="0.0.0.0", port=8000)
22
 
23
+ if __name__ == '__main__':
24
+ main()