16 lines
384 B
Python
16 lines
384 B
Python
from fastapi import FastAPI
|
|
from backend.app.routers import health, translation
|
|
|
|
app = FastAPI()
|
|
|
|
app.include_router(health.router)
|
|
app.include_router(translation.router, prefix="/api")
|
|
|
|
@app.on_event("startup")
|
|
async def startup_event():
|
|
print("Avvio del servizio di traduzione")
|
|
|
|
@app.on_event("shutdown")
|
|
async def shutdown_event():
|
|
await translation.ollama_client.close()
|