Spaces:
Runtime error
Runtime error
Mikhil-jivus
commited on
Commit
•
708397c
1
Parent(s):
92c80ef
Update app.py
Browse files
app.py
CHANGED
@@ -67,7 +67,7 @@ def generate(
|
|
67 |
gr.Warning(f"Trimmed input from conversation as it was longer than {MAX_INPUT_TOKEN_LENGTH} tokens.")
|
68 |
input_ids = input_ids.to(model.device)
|
69 |
|
70 |
-
streamer = TextIteratorStreamer(tokenizer, timeout=20.0, skip_prompt=
|
71 |
generate_kwargs = dict(
|
72 |
{"input_ids": input_ids},
|
73 |
streamer=streamer,
|
|
|
67 |
gr.Warning(f"Trimmed input from conversation as it was longer than {MAX_INPUT_TOKEN_LENGTH} tokens.")
|
68 |
input_ids = input_ids.to(model.device)
|
69 |
|
70 |
+
streamer = TextIteratorStreamer(tokenizer, timeout=20.0, skip_prompt=True, skip_special_tokens=True)
|
71 |
generate_kwargs = dict(
|
72 |
{"input_ids": input_ids},
|
73 |
streamer=streamer,
|