Spaces:
Runtime error
Runtime error
fix
Browse files
app.py
CHANGED
|
@@ -65,9 +65,12 @@ def process_audio(audio, text, chat_history):
|
|
| 65 |
generation_args = {
|
| 66 |
"max_new_tokens": 4096,
|
| 67 |
"streamer": streamer,
|
|
|
|
|
|
|
| 68 |
**inputs
|
| 69 |
}
|
| 70 |
# Start a separate thread for model generation to allow streaming output
|
|
|
|
| 71 |
thread = Thread(
|
| 72 |
target=model.generate,
|
| 73 |
kwargs=generation_args,
|
|
|
|
| 65 |
generation_args = {
|
| 66 |
"max_new_tokens": 4096,
|
| 67 |
"streamer": streamer,
|
| 68 |
+
"eos_token_id":151645,
|
| 69 |
+
"pad_token_id":151643,
|
| 70 |
**inputs
|
| 71 |
}
|
| 72 |
# Start a separate thread for model generation to allow streaming output
|
| 73 |
+
chat_history.append({"role": "assistant", "content": ""})
|
| 74 |
thread = Thread(
|
| 75 |
target=model.generate,
|
| 76 |
kwargs=generation_args,
|