small refactoring

This commit is contained in:
2025-10-06 11:27:55 +02:00
parent 0019644e61
commit 6306cfc374
6 changed files with 3 additions and 3 deletions

View File

@ -145,8 +145,8 @@ async def lifespan(app: FastAPI):
app = FastAPI(lifespan=lifespan)
# Mount static files for serving CSS and JavaScript
app.mount("/static", StaticFiles(directory="."), name="static")
# Mount static files for serving CSS, JavaScript, and HTML assets
app.mount("/static", StaticFiles(directory="static"), name="static")
sock = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
sock.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1)
@ -161,7 +161,7 @@ async def read_index():
@app.get("/display")
async def read_display():
return FileResponse('player-display.html')
return FileResponse('static/player-display.html')
@app.post("/facialexpressions")
def read_item(weights: list[float]):