Spaces:
Sleeping
Sleeping
Interior Env
Exposed live Physics engine logic to Frontend Visualizer and upgraded LLM agent prompt
a373fb7 Download models.py from 1akshith/interior-env: direct link, hf CLI and curl.
- Browser
- Download file 939 Bytes
-
https://huggingface.co/spaces/1akshith/interior-env/resolve/main/models.py
- Command line
-
hf download hf://spaces/1akshith/interior-env/models.py
-
curl -L -o models.py https://huggingface.co/spaces/1akshith/interior-env/resolve/main/models.py
939 Bytes
| from pydantic import BaseModel | |
| from typing import Dict, List, Tuple | |
| class Furniture(BaseModel): | |
| id: str | |
| width: int # units (e.g. 1 unit = 0.5 meter) | |
| height: int | |
| rules: List[str] = [] | |
| class PlacedFurniture(BaseModel): | |
| id: str | |
| x: int | |
| y: int | |
| rotation: int # 0 or 90 | |
| class Action(BaseModel): | |
| action_type: str # "place_item", "remove_item", "no_op" | |
| item: str = "" | |
| x: int = 0 | |
| y: int = 0 | |
| rotation: int = 0 # 0 or 90 | |
| class Observation(BaseModel): | |
| room_size: Tuple[int, int] | |
| door_position: Tuple[int, int] | |
| windows: List[Tuple[int, int]] = [] | |
| unplaced_items: List[Furniture] | |
| placed_items: Dict[str, PlacedFurniture] | |
| solar_grid: List[List[bool]] = [] | |
| thermal_grid: List[List[float]] = [] | |
| feedback_logs: List[str] | |
| step_count: int | |
| max_steps: int | |
| class EpisodeResult(BaseModel): | |
| task_id: str | |
| success: bool | |
| score: float | |
| steps_taken: int | |