Spaces:
Running
on
Zero
Running
on
Zero
Reduce timeout for TextIteratorStreamer in app.py from 60.0 to 30.0 seconds
Browse files
app.py
CHANGED
@@ -119,7 +119,7 @@ def run(message: dict, history: list[dict], system_prompt: str = "", max_new_tok
|
|
119 |
return_tensors="pt",
|
120 |
).to(device=model.device, dtype=torch.bfloat16)
|
121 |
|
122 |
-
streamer = TextIteratorStreamer(processor, timeout=
|
123 |
generate_kwargs = dict(
|
124 |
inputs,
|
125 |
streamer=streamer,
|
|
|
119 |
return_tensors="pt",
|
120 |
).to(device=model.device, dtype=torch.bfloat16)
|
121 |
|
122 |
+
streamer = TextIteratorStreamer(processor, timeout=30.0, skip_prompt=True, skip_special_tokens=True)
|
123 |
generate_kwargs = dict(
|
124 |
inputs,
|
125 |
streamer=streamer,
|