increase time out
Browse files
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=
|
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
|