fix: uploaded file were closed automatically before the model could infer their data
This commit is contained in:
parent
639425ad7d
commit
b89fafdc96
6 changed files with 62 additions and 12 deletions
|
@ -2,5 +2,7 @@
|
|||
"type": "python",
|
||||
"file": "model.py",
|
||||
|
||||
"inputs": {}
|
||||
"inputs": {
|
||||
"file": {"type": "file"}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -8,5 +8,5 @@ def load(model) -> None:
|
|||
def unload(model) -> None:
|
||||
pass
|
||||
|
||||
def infer(model) -> typing.Iterator[bytes]:
|
||||
def infer(model, file) -> typing.Iterator[bytes]:
|
||||
yield json.dumps({"hello": "world!"}).encode("utf-8")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue