cutechicken commited on
Commit
e354b27
1 Parent(s): 58e272a

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -1
app.py CHANGED
@@ -78,7 +78,8 @@ def stream_chat(message: str, history: list, temperature: float, max_new_tokens:
78
  input_ids = tokenizer.apply_chat_template(conversation, tokenize=False, add_generation_prompt=True)
79
  inputs = tokenizer(input_ids, return_tensors="pt").to(0)
80
 
81
- streamer = TextIteratorStreamer(tokenizer, timeout
 
82
 
83
  generate_kwargs = dict(
84
  inputs,
 
78
  input_ids = tokenizer.apply_chat_template(conversation, tokenize=False, add_generation_prompt=True)
79
  inputs = tokenizer(input_ids, return_tensors="pt").to(0)
80
 
81
+
82
+ streamer = TextIteratorStreamer(tokenizer, timeout=10., skip_prompt=True, skip_special_tokens=True)
83
 
84
  generate_kwargs = dict(
85
  inputs,