Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -53,7 +53,7 @@ class BatchStreamer(TextIteratorStreamer):
|
|
53 |
|
54 |
# Add the new token to the cache and decodes the entire thing.
|
55 |
for c, v in zip(self.token_cache, value):
|
56 |
-
c += v
|
57 |
|
58 |
paragraphs = [tokenizer.decode(c, **self.decode_kwargs).strip() for c in self.token_cache]
|
59 |
text = '\n'.join(paragraphs)
|
|
|
53 |
|
54 |
# Add the new token to the cache and decodes the entire thing.
|
55 |
for c, v in zip(self.token_cache, value):
|
56 |
+
c += [v] if isinstance(v, int) else v
|
57 |
|
58 |
paragraphs = [tokenizer.decode(c, **self.decode_kwargs).strip() for c in self.token_cache]
|
59 |
text = '\n'.join(paragraphs)
|