add mediapipehands exemple

This commit is contained in:
2023-01-14 15:35:32 +01:00
parent 20d679e70c
commit b8c332bc08
7 changed files with 59 additions and 2 deletions

View File

@@ -3,6 +3,7 @@ import json
import websockets
import random
import os
import hands
class WebsocketServer:
def __init__(self,getEffects,port=os.getenv("PORT"),host=os.getenv("HOST")) -> None:
@@ -18,6 +19,7 @@ class WebsocketServer:
async def handler(self,websocket):
while True:
messages = self.getEffects()
hands.frame()
await websocket.send(json.dumps(messages))
await asyncio.sleep(1/30)