Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -217,15 +217,15 @@ def process_audio_query(audio_input):
|
|
217 |
audio_path = generate_audio_elevenlabs(response_text)
|
218 |
return audio_path
|
219 |
|
220 |
-
# Create Gradio
|
221 |
-
|
222 |
-
|
223 |
-
|
224 |
-
|
225 |
-
|
226 |
-
|
227 |
-
|
228 |
-
|
229 |
|
230 |
# Launch the Gradio app
|
231 |
interface.launch()
|
|
|
217 |
audio_path = generate_audio_elevenlabs(response_text)
|
218 |
return audio_path
|
219 |
|
220 |
+
# Create Gradio interface for audio input and output
|
221 |
+
interface = gr.Interface(
|
222 |
+
fn=process_audio_query,
|
223 |
+
inputs=gr.Audio(sources="microphone", type="numpy",streaming=True),
|
224 |
+
outputs=gr.Audio(type="filepath", autoplay=True,interactive=False),
|
225 |
+
live=True,
|
226 |
+
description="Ask questions via audio and receive audio responses.",
|
227 |
+
allow_flagging="never" # Disables the Clear button
|
228 |
+
)
|
229 |
|
230 |
# Launch the Gradio app
|
231 |
interface.launch()
|