Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -50,7 +50,7 @@ def generate(
|
|
50 |
gr.Warning(f"Trimmed input from conversation as it was longer than {MAX_INPUT_TOKEN_LENGTH} tokens.")
|
51 |
input_ids = input_ids.to(model.device)
|
52 |
|
53 |
-
streamer = TextIteratorStreamer(tokenizer,
|
54 |
|
55 |
generate_kwargs = dict(
|
56 |
{"input_ids": input_ids},
|
|
|
50 |
gr.Warning(f"Trimmed input from conversation as it was longer than {MAX_INPUT_TOKEN_LENGTH} tokens.")
|
51 |
input_ids = input_ids.to(model.device)
|
52 |
|
53 |
+
streamer = TextIteratorStreamer(tokenizer, skip_prompt=True, skip_special_tokens=True)
|
54 |
|
55 |
generate_kwargs = dict(
|
56 |
{"input_ids": input_ids},
|