sairaj2 commited on
Commit
7eeb455
·
verified ·
1 Parent(s): 56ddfd4

Upload folder using huggingface_hub

Browse files
Files changed (2) hide show
  1. server/app.py +4 -7
  2. server/env_environment.py +3 -5
server/app.py CHANGED
@@ -35,12 +35,9 @@ except Exception as e: # pragma: no cover
35
  "openenv is required for the web interface. Install dependencies with '\n uv sync\n'"
36
  ) from e
37
 
38
- try:
39
- from ..models import EnvAction, EnvObservation
40
- from .env_environment import EnvEnvironment
41
- except ModuleNotFoundError:
42
- from models import EnvAction, EnvObservation
43
- from server.env_environment import EnvEnvironment
44
 
45
 
46
  # Create the app with web interface and README integration
@@ -81,4 +78,4 @@ if __name__ == "__main__":
81
  parser = argparse.ArgumentParser()
82
  parser.add_argument("--port", type=int, default=8000)
83
  args = parser.parse_args()
84
- main(port=args.port)
 
35
  "openenv is required for the web interface. Install dependencies with '\n uv sync\n'"
36
  ) from e
37
 
38
+ # Use absolute imports (PYTHONPATH is set to /app/env in Dockerfile)
39
+ from models import EnvAction, EnvObservation
40
+ from server.env_environment import EnvEnvironment
 
 
 
41
 
42
 
43
  # Create the app with web interface and README integration
 
78
  parser = argparse.ArgumentParser()
79
  parser.add_argument("--port", type=int, default=8000)
80
  args = parser.parse_args()
81
+ main(port=args.port)
server/env_environment.py CHANGED
@@ -16,10 +16,8 @@ from uuid import uuid4
16
  from openenv.core.env_server.interfaces import Environment
17
  from openenv.core.env_server.types import State
18
 
19
- try:
20
- from ..models import EnvAction, EnvObservation
21
- except ImportError:
22
- from models import EnvAction, EnvObservation
23
 
24
 
25
  class EnvEnvironment(Environment):
@@ -101,4 +99,4 @@ class EnvEnvironment(Environment):
101
  Returns:
102
  Current State with episode_id and step_count
103
  """
104
- return self._state
 
16
  from openenv.core.env_server.interfaces import Environment
17
  from openenv.core.env_server.types import State
18
 
19
+ # Use absolute imports (PYTHONPATH is set to /app/env in Dockerfile)
20
+ from models import EnvAction, EnvObservation
 
 
21
 
22
 
23
  class EnvEnvironment(Environment):
 
99
  Returns:
100
  Current State with episode_id and step_count
101
  """
102
+ return self._state