Vaish6 commited on
Commit
2c2a501
·
verified ·
1 Parent(s): 35c6c78

Upload app.py

Browse files
Files changed (1) hide show
  1. app.py +9 -15
app.py CHANGED
@@ -61,28 +61,22 @@ class OpenEnvHandler(BaseHTTPRequestHandler):
61
  self.end_headers()
62
 
63
  def do_GET(self):
64
- if self.path == "/validate" or self.path == "/openenv/validate":
 
 
 
 
 
65
  self.send_json(200, {
66
  "status": "ok",
67
- "name": "MetaOCT-Simulator",
68
  "version": "1.0.0",
69
- "tasks": ["easy", "medium", "hard"],
 
70
  "action_space": ["request_oct_scan", "enhance_contrast", "measure_fluid_thickness", "submit_diagnosis"],
71
  "observation_space": ["acquired_scans", "available_budget", "tool_outputs", "step_count"]
72
  })
73
  elif self.path == "/" or self.path == "/health":
74
- self.send_json(200, {"status": "running", "env": "MetaOCT-Simulator"})
75
- elif self.path == "/openenv/info":
76
- self.send_json(200, {
77
- "name": "MetaOCT-Simulator",
78
- "description": "Multi-step POMDP clinical OCT diagnostic environment",
79
- "tasks": [
80
- {"id": "easy", "name": "Easy POMDP Diagnosis", "difficulty": "easy", "budget": 1000, "description": "Basic POMDP traversal", "grader": "tasks:grade_easy"},
81
- {"id": "medium", "name": "Medium Accuracy POMDP", "difficulty": "medium", "budget": 400, "description": "Precision optimization", "grader": "tasks:grade_medium"},
82
- {"id": "hard", "name": "Hard Zero-Shot POMDP", "difficulty": "hard", "budget": 200, "description": "Extreme resource constraints", "grader": "tasks:grade_hard"}
83
- ]
84
- })
85
- else:
86
  self.send_json(404, {"error": "Not found"})
87
 
88
  def do_POST(self):
 
61
  self.end_headers()
62
 
63
  def do_GET(self):
64
+ if self.path == "/validate" or self.path == "/openenv/validate" or self.path == "/openenv/info":
65
+ task_list = [
66
+ {"id": "easy", "name": "Easy POMDP Diagnosis", "difficulty": "easy", "budget": 1000, "description": "Basic POMDP traversal", "grader": "tasks:grade_easy"},
67
+ {"id": "medium", "name": "Medium Accuracy POMDP", "difficulty": "medium", "budget": 400, "description": "Precision optimization", "grader": "tasks:grade_medium"},
68
+ {"id": "hard", "name": "Hard Zero-Shot POMDP", "difficulty": "hard", "budget": 200, "description": "Extreme resource constraints", "grader": "tasks:grade_hard"}
69
+ ]
70
  self.send_json(200, {
71
  "status": "ok",
72
+ "name": "MetaOCT",
73
  "version": "1.0.0",
74
+ "description": "Multi-step POMDP clinical OCT diagnostic environment",
75
+ "tasks": task_list,
76
  "action_space": ["request_oct_scan", "enhance_contrast", "measure_fluid_thickness", "submit_diagnosis"],
77
  "observation_space": ["acquired_scans", "available_budget", "tool_outputs", "step_count"]
78
  })
79
  elif self.path == "/" or self.path == "/health":
 
 
 
 
 
 
 
 
 
 
 
 
80
  self.send_json(404, {"error": "Not found"})
81
 
82
  def do_POST(self):