Hemanth Kunta commited on
Commit
f2185c5
·
1 Parent(s): ee95e34

add OpenEnv API endpoints for validation

Browse files
Files changed (1) hide show
  1. space_app.py +15 -0
space_app.py CHANGED
@@ -247,6 +247,21 @@ def _health() -> dict[str, str]:
247
  return health()
248
 
249
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
250
  with gr.Blocks(title="DataQualityEnv") as demo:
251
  gr.Markdown(
252
  "# DataQualityEnv\n"
 
247
  return health()
248
 
249
 
250
+ @fastapi_app.post("/reset")
251
+ def _reset(payload: dict) -> dict:
252
+ return SESSION.reset(payload)
253
+
254
+
255
+ @fastapi_app.post("/step")
256
+ def _step(payload: dict) -> dict:
257
+ return SESSION.step(payload)
258
+
259
+
260
+ @fastapi_app.get("/state")
261
+ def _state() -> dict:
262
+ return SESSION.state()
263
+
264
+
265
  with gr.Blocks(title="DataQualityEnv") as demo:
266
  gr.Markdown(
267
  "# DataQualityEnv\n"