ДК
Size: a a a
ДК
A
M
M
from fastapi import BackgroundTasks, FastAPI
app = FastAPI()
async def train():
pass # very long
@app.post("/train_model/")
async def train_model(background_tasks: BackgroundTasks):
background_tasks.add_task(train)
return {"message": "Notification sent in the background"}
M
from fastapi import BackgroundTasks, FastAPI
app = FastAPI()
async def train():
pass # very long
@app.post("/train_model/")
async def train_model(background_tasks: BackgroundTasks):
background_tasks.add_task(train)
return {"message": "Notification sent in the background"}
AP
༒
ch
AL
༒
a
СВ
MK
MK
MK
СВ