Update app.py
Browse files
app.py
CHANGED
|
@@ -161,7 +161,7 @@ def generate(
|
|
| 161 |
|
| 162 |
if is_tts and voice:
|
| 163 |
output_file = asyncio.run(text_to_speech(final_response, voice))
|
| 164 |
-
yield gr.Audio(output_file, autoplay=True) # Return
|
| 165 |
else:
|
| 166 |
yield final_response # Return text response
|
| 167 |
|
|
|
|
| 161 |
|
| 162 |
if is_tts and voice:
|
| 163 |
output_file = asyncio.run(text_to_speech(final_response, voice))
|
| 164 |
+
yield gr.Audio(output_file, autoplay=True) # Return audio response as a separate component
|
| 165 |
else:
|
| 166 |
yield final_response # Return text response
|
| 167 |
|