Lifespan (FastAPI)
Also written: lifespan, asynccontextmanager
Code that runs once when the service starts and stops. The service loads its model there instead of on every request.
Also written: lifespan, asynccontextmanager
Code that runs once when the service starts and stops. The service loads its model there instead of on every request.