JosephusCheung commited on
Commit
803a940
β€’
1 Parent(s): 9b70592

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -47,7 +47,7 @@ def stream_chat(message: str, history: list, temperature: float, max_length: int
47
  print(f"Conversation is -\n{conversation}")
48
 
49
  input_ids = tokenizer.apply_chat_template(conversation, tokenize=True, add_generation_prompt=True, return_tensors="pt", return_dict=True).to(model.device)
50
- streamer = TextIteratorStreamer(tokenizer, timeout=60.0, skip_prompt=True, skip_special_tokens=True)
51
 
52
  generate_kwargs = dict(
53
  max_length=max_length,
 
47
  print(f"Conversation is -\n{conversation}")
48
 
49
  input_ids = tokenizer.apply_chat_template(conversation, tokenize=True, add_generation_prompt=True, return_tensors="pt", return_dict=True).to(model.device)
50
+ streamer = TextIteratorStreamer(tokenizer, skip_prompt=True, skip_special_tokens=True)
51
 
52
  generate_kwargs = dict(
53
  max_length=max_length,