rasyosef commited on
Commit
bca6bf8
1 Parent(s): a13b06e

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -35,7 +35,7 @@ def generate(prompt, chat_history, max_new_tokens):
35
  final_prompt += "Output:"
36
 
37
  # Streamer
38
- streamer = TextIteratorStreamer(tokenizer=tokenizer, skip_prompt=True)
39
  thread = Thread(target=phi2, kwargs={"text_inputs":final_prompt, "max_new_tokens":max_new_tokens, "streamer":streamer})
40
  thread.start()
41
 
 
35
  final_prompt += "Output:"
36
 
37
  # Streamer
38
+ streamer = TextIteratorStreamer(tokenizer=tokenizer, skip_prompt=True, skip_special_tokens=True, timeout=300.0)
39
  thread = Thread(target=phi2, kwargs={"text_inputs":final_prompt, "max_new_tokens":max_new_tokens, "streamer":streamer})
40
  thread.start()
41