Skip to content

Commit 59735a1

Browse files
committed
Add main block for running Uvicorn server.
1 parent b5e3c14 commit 59735a1

1 file changed

Lines changed: 7 additions & 1 deletion

File tree

api/main.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -191,4 +191,10 @@ async def websocket_worm(ws: WebSocket):
191191
elif cmd == "inference":
192192
obs = data.get("obs", []) # raw 8-D observation
193193
act_vec = infer_action_worm(obs)
194-
await ws.send_json({"type": "action", "action": act_vec})
194+
await ws.send_json({"type": "action", "action": act_vec})
195+
196+
197+
if __name__ == "__main__":
198+
import uvicorn
199+
200+
uvicorn.run(app, host="0.0.0.0", port=8001)

0 commit comments

Comments
 (0)