edusync / run.py
sakshusat's picture
feat: implement initial face recognition service with API endpoints for registration, attendance, and anti-spoofing capabilities.
e51f7f4
raw
history blame contribute delete
560 Bytes
import uvicorn
from app.core.config import settings
import os
if __name__ == "__main__":
print(f"🚀 Starting optimized {settings.PROJECT_NAME}...")
# Scaling to multiple workers to handle concurrent attendance requests
# (Memory allowing - ArcFace is ~20MB so 4 workers is safe)
cpu_count = os.cpu_count() or 1
worker_count = min(4, cpu_count)
uvicorn.run(
"app.main:app",
host="0.0.0.0",
port=8000,
reload=False,
workers=worker_count,
loop="auto",
http="h11"
)