Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -96,12 +96,15 @@ with gr.Blocks() as demo:
|
|
96 |
|
97 |
with gr.Row():
|
98 |
with gr.Column():
|
99 |
-
gr.Audio(type="filepath", label="Upload Audio File")
|
100 |
-
gr.Button("Submit")
|
101 |
|
102 |
with gr.Column():
|
103 |
-
gr.Textbox(label="Response Text", placeholder="The AI-generated response will appear here", lines=5)
|
104 |
-
gr.Audio(label="Response Audio", type="filepath")
|
|
|
|
|
|
|
105 |
|
106 |
# Launch the Gradio app
|
107 |
demo.launch()
|
|
|
96 |
|
97 |
with gr.Row():
|
98 |
with gr.Column():
|
99 |
+
audio_input = gr.Audio(type="filepath", label="Upload Audio File")
|
100 |
+
submit_button = gr.Button("Submit")
|
101 |
|
102 |
with gr.Column():
|
103 |
+
response_text = gr.Textbox(label="Response Text", placeholder="The AI-generated response will appear here", lines=5)
|
104 |
+
response_audio = gr.Audio(label="Response Audio", type="filepath")
|
105 |
+
|
106 |
+
# Link the submit button to the process_audio function
|
107 |
+
submit_button.click(fn=process_audio, inputs=audio_input, outputs=[response_text, response_audio])
|
108 |
|
109 |
# Launch the Gradio app
|
110 |
demo.launch()
|