TanishaGupta30/layoutgym
0
LayoutGym ๐จ
An OpenEnv environment for AI-driven UI/UX conversion optimization.
Overview
LayoutGym simulates a landing page as a structured JSON DOM tree. An AI agent acts as a conversion-rate expert, manipulating element positions, colors, and content to maximize a Predicted Engagement Score (0.0โ1.0) โ inspired by Fitts's Law and gaze prediction models.
Observation Space
Action Space
Tasks
Setup
pip install -r requirements.txt
uvicorn server.app:app --host 0.0.0.0 --port 7860Run Baseline
export API_BASE_URL="https://api.openai.com/v1"
export MODEL_NAME="gpt-4o-mini"
export HF_TOKEN="your_token_here"
export ENV_URL="http://localhost:7860"
python inference.pyAPI Endpoints
GET /healthโ Health checkGET /tasksโ List all tasksPOST /resetโ{"task_id": "cta_rescue"}POST /stepโ{"action": {...}}GET /stateโ Current environment state
