saiteja-coder commited on
Commit
2ec850e
·
verified ·
1 Parent(s): 655a7b0

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -1
app.py CHANGED
@@ -13,7 +13,7 @@ class Action(BaseModel):
13
  def reset():
14
  obs = env.reset()
15
  return {
16
- "observation": obs # IMPORTANT KEY NAME
17
  }
18
 
19
  @app.post("/step")
@@ -26,3 +26,8 @@ def step(action: Action):
26
  @app.get("/")
27
  def home():
28
  return {"status": "running"}
 
 
 
 
 
 
13
  def reset():
14
  obs = env.reset()
15
  return {
16
+ "observation": obs
17
  }
18
 
19
  @app.post("/step")
 
26
  @app.get("/")
27
  def home():
28
  return {"status": "running"}
29
+
30
+ # IMPORTANT: entrypoint function
31
+ def main():
32
+ import uvicorn
33
+ uvicorn.run(app, host="0.0.0.0", port=7860)