pvduy commited on
Commit
b2926ec
1 Parent(s): 23521bb

increase time out

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -29,7 +29,7 @@ def predict(message, history, system_prompt, temperature, max_tokens):
29
  instruction += '\n<|im_start|>user\n' + message + '\n<|im_end|>\n<|im_start|>assistant\n'
30
  problem = [instruction]
31
  stop_tokens = ["<|endoftext|>", "<|im_end|>"]
32
- streamer = TextIteratorStreamer(tokenizer, timeout=10.0, skip_prompt=True, skip_special_tokens=True)
33
  enc = tokenizer(problem, return_tensors="pt", padding=True, truncation=True)
34
  input_ids = enc.input_ids
35
  attention_mask = enc.attention_mask
 
29
  instruction += '\n<|im_start|>user\n' + message + '\n<|im_end|>\n<|im_start|>assistant\n'
30
  problem = [instruction]
31
  stop_tokens = ["<|endoftext|>", "<|im_end|>"]
32
+ streamer = TextIteratorStreamer(tokenizer, timeout=100.0, skip_prompt=True, skip_special_tokens=True)
33
  enc = tokenizer(problem, return_tensors="pt", padding=True, truncation=True)
34
  input_ids = enc.input_ids
35
  attention_mask = enc.attention_mask