Param20h commited on
Commit
35c8316
Β·
verified Β·
1 Parent(s): 210535c

Upload folder using huggingface_hub

Browse files
Files changed (1) hide show
  1. server/app.py +11 -1
server/app.py CHANGED
@@ -83,9 +83,19 @@ class BaselineResponse(BaseModel):
83
  # Endpoints
84
  # ──────────────────────────────────────────────────────────────────────────────
85
 
 
 
 
 
86
  @app.get("/", summary="Health check")
87
  def health() -> Dict[str, str]:
88
- return {"status": "ok", "environment": "sql-query-optimizer", "version": "1.0.0"}
 
 
 
 
 
 
89
 
90
 
91
  @app.post("/reset", response_model=Observation, summary="Start / restart an episode")
 
83
  # Endpoints
84
  # ──────────────────────────────────────────────────────────────────────────────
85
 
86
+ def _health_payload() -> Dict[str, str]:
87
+ return {"status": "ok", "environment": "sql-query-optimizer", "version": "1.0.0"}
88
+
89
+
90
  @app.get("/", summary="Health check")
91
  def health() -> Dict[str, str]:
92
+ return _health_payload()
93
+
94
+
95
+ @app.get("/web", include_in_schema=False)
96
+ @app.get("/web/", include_in_schema=False)
97
+ def web_health() -> Dict[str, str]:
98
+ return _health_payload()
99
 
100
 
101
  @app.post("/reset", response_model=Observation, summary="Start / restart an episode")