GitXplorerGitXplorer
E

FlanT5-stream

public
0 stars
0 forks
0 issues

Commits

List of commits on branch main.
Unverified
7c3b196a23971fe3c8f4f675fb391167ccf328bc

debugging

EErikKaum committed 2 years ago
Unverified
f852a5a6c13a83d35372c2d1f2979f58e81faeae

debugging

EErikKaum committed 2 years ago
Unverified
34f3afaa241dc301632050cbcf39bc7d9e3ffdb5

more small changes

EErikKaum committed 2 years ago
Unverified
11c044c0e7a273ada8bae2901d17d94f8a39ba73

more small changes

EErikKaum committed 2 years ago
Unverified
fbd0005579ddda63beb1d9e84119b4c898a533a7

small changes

EErikKaum committed 2 years ago
Unverified
cdfc600325192f8c2c5aa8ca241c252e97cbaa36

initial commit

EErikKaum committed 2 years ago

README

The README file for this repository.

🍌 Banana Demo on making a streaming API

This template to show how you can stream text (or any other data) from your model on Banana. We use a few tricks to do this:

  • a small hack to the transformers module to make the FlanT5 model output tokens as soon as they are ready, repo here.
  • using FastAPI server-sent-events to send the chunks to a client as a stream. This blog is a useful intro.

Note

Since the response comes as a stream of server-sent-events, the example output is not fully representative of how to handle it. test.py contains a more comlete example.