Hi!
I’m going through the ungraded lab from the first week and I’m surprised at seeing this syntax:
@app.post("/predict")
def prediction(model: Model, file: UploadFile = File(...)):
I understand that the prediction
function receives two parameters and the second parameter if of type UploadFile
(a FastAPI format). But its default value File(...)
doesn’t make sense to me. What do the three dots mean? Is this a FastAPI-specific format or a recent python change?
Thanks!