Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -159,7 +159,7 @@ def get_response(question):
|
|
159 |
|
160 |
# Define the function to clear input and output
|
161 |
def clear_fields():
|
162 |
-
return "", ""
|
163 |
|
164 |
# Function to generate audio with Eleven Labs TTS
|
165 |
def generate_audio_elevenlabs(text):
|
@@ -220,7 +220,7 @@ with gr.Blocks() as demo:
|
|
220 |
|
221 |
# Define interactions
|
222 |
get_response_btn.click(fn=get_response, inputs=question_input, outputs=response_output)
|
223 |
-
generate_audio_btn.click(fn=generate_audio_elevenlabs, inputs=response_output, outputs=audio_output)
|
224 |
clean_btn.click(fn=clear_fields, inputs=[], outputs=[question_input, response_output])
|
225 |
|
226 |
# Launch the Gradio interface
|
|
|
159 |
|
160 |
# Define the function to clear input and output
|
161 |
def clear_fields():
|
162 |
+
return "", ""
|
163 |
|
164 |
# Function to generate audio with Eleven Labs TTS
|
165 |
def generate_audio_elevenlabs(text):
|
|
|
220 |
|
221 |
# Define interactions
|
222 |
get_response_btn.click(fn=get_response, inputs=question_input, outputs=response_output)
|
223 |
+
generate_audio_btn.click.then(fn=generate_audio_elevenlabs, inputs=response_output, outputs=audio_output)
|
224 |
clean_btn.click(fn=clear_fields, inputs=[], outputs=[question_input, response_output])
|
225 |
|
226 |
# Launch the Gradio interface
|