added support for additional more user-friendly interfaces, improved some part of the application loading process to make it a bit simpler
This commit is contained in:
parent
1a49aa3779
commit
f647c960dd
20 changed files with 353 additions and 107 deletions
|
@ -16,7 +16,7 @@ def unload(model) -> None:
|
|||
model.model = None
|
||||
model.tokenizer = None
|
||||
|
||||
def infer(model, prompt: str) -> typing.Iterator[bytes]:
|
||||
async def infer(model, prompt: str) -> typing.AsyncIterator[bytes]:
|
||||
inputs = model.tokenizer(prompt, return_tensors="pt")
|
||||
|
||||
with torch.no_grad():
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue