Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
app.py
CHANGED
@@ -62,7 +62,7 @@ def generate(
|
|
62 |
gr.Warning(f"Trimmed input from conversation as it was longer than {MAX_INPUT_TOKEN_LENGTH} tokens.")
|
63 |
input_ids = input_ids.to(model.device)
|
64 |
|
65 |
-
streamer = TextIteratorStreamer(tokenizer, timeout=10.0, skip_prompt=True)
|
66 |
generate_kwargs = dict(
|
67 |
{"input_ids": input_ids},
|
68 |
streamer=streamer,
|
|
|
62 |
gr.Warning(f"Trimmed input from conversation as it was longer than {MAX_INPUT_TOKEN_LENGTH} tokens.")
|
63 |
input_ids = input_ids.to(model.device)
|
64 |
|
65 |
+
streamer = TextIteratorStreamer(tokenizer, timeout=10.0, skip_prompt=True, skip_special_tokens=True)
|
66 |
generate_kwargs = dict(
|
67 |
{"input_ids": input_ids},
|
68 |
streamer=streamer,
|