Skip to content

FastAPI의 고동 시성 특성을 바탕으로 MediaPipe · OpenCV를 활용해 거북목, 허리 굽힘, 얼굴 좌우 비대칭을 실시간으로 감지·분석하고, 지연과 자원 사용을 최적화한 서비스

Notifications You must be signed in to change notification settings

Text-Neck-Hub/Core

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

from fastapi import FastAPI, WebSocket from fastapi.responses import HTMLResponse

app = FastAPI()

html = """

<title>WebSocket Test</title>

WebSocket Echo

<textarea id="log" rows="10" cols="30"></textarea>
Send <script> var ws = new WebSocket("ws://localhost:8000/ws"); ws.onmessage = function(event) { document.getElementById('log').value += event.data + '\\n'; }; function sendMessage() { var input = document.getElementById("messageInput"); ws.send(input.value); input.value = ''; } </script> """

@app.get("/") async def get(): return HTMLResponse(html)

@app.websocket("/ws") async def websocket_endpoint(websocket: WebSocket): await websocket.accept() while True: data = await websocket.receive_text() await websocket.send_text(f"Echo: {data}")

About

FastAPI의 고동 시성 특성을 바탕으로 MediaPipe · OpenCV를 활용해 거북목, 허리 굽힘, 얼굴 좌우 비대칭을 실시간으로 감지·분석하고, 지연과 자원 사용을 최적화한 서비스

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages