small refactoring
This commit is contained in:
@ -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]):
|
||||
|
||||
Reference in New Issue
Block a user