hysts HF staff commited on
Commit
4b359d4
·
1 Parent(s): eeb9857

Reduce timeout for TextIteratorStreamer in app.py from 60.0 to 30.0 seconds

Browse files
Files changed (1) hide show
  1. app.py +1 -1
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=60.0, skip_prompt=True, skip_special_tokens=True)
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,