added auto-detection for the output type on the client side to be able to download binary files such as videos

This commit is contained in:
faraphel 2025-01-10 19:12:21 +01:00
parent 775c78c6cb
commit 1a49aa3779
5 changed files with 39 additions and 1 deletions

View file

@ -77,6 +77,12 @@ class PythonModel(base.BaseModel):
infer_api,
methods=["POST"],
tags=self.tags,
# summary=...,
# description=...,
response_class=fastapi.responses.StreamingResponse,
responses={
200: {"content": {self.output_type: {}}}
},
)
def _load(self) -> None: