Update app.py
Browse files
app.py
CHANGED
|
@@ -249,8 +249,10 @@ def generate(
|
|
| 249 |
input_ids = input_ids.to(model.device)
|
| 250 |
|
| 251 |
# Set up the TextIteratorStreamer
|
| 252 |
-
streamer = TextIteratorStreamer(tokenizer, timeout=10.0, skip_prompt=True, skip_special_tokens=True)
|
| 253 |
-
|
|
|
|
|
|
|
| 254 |
# Set up the generation arguments
|
| 255 |
generate_kwargs = dict(
|
| 256 |
{"input_ids": input_ids},
|
|
|
|
| 249 |
input_ids = input_ids.to(model.device)
|
| 250 |
|
| 251 |
# Set up the TextIteratorStreamer
|
| 252 |
+
#streamer = TextIteratorStreamer(tokenizer, timeout=10.0, skip_prompt=True, skip_special_tokens=True)
|
| 253 |
+
# Set new timeout error mitigation
|
| 254 |
+
streamer = TextIteratorStreamer(tokenizer, timeout=30.0, skip_prompt=True, skip_special_tokens=True)
|
| 255 |
+
|
| 256 |
# Set up the generation arguments
|
| 257 |
generate_kwargs = dict(
|
| 258 |
{"input_ids": input_ids},
|