davda54 commited on
Commit
4bae60c
1 Parent(s): bab95c6

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
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)