Update app.py
Browse files
app.py
CHANGED
@@ -145,7 +145,7 @@ with gr.Blocks(css="style.css") as demo:
|
|
145 |
with gr.Row():
|
146 |
input = gr.Audio(label="Your Voice Chat", type="filepath", interactive=True, sources="microphone", waveform_options=False)
|
147 |
output = gr.Audio(label="Hermione", type="filepath", interactive=False, autoplay=True, elem_classes="audio")
|
148 |
-
gr.Interface(fn=respond, inputs=input, outputs=output, live=False)
|
149 |
|
150 |
|
151 |
with gr.Row():
|
@@ -154,7 +154,7 @@ with gr.Blocks(css="style.css") as demo:
|
|
154 |
output_audio = gr.Audio(label="Hermione", type="filepath", interactive=False, autoplay=True, elem_classes="audio")
|
155 |
with gr.Row():
|
156 |
translate_btn = gr.Button("Response")
|
157 |
-
translate_btn.click(fn=generate1, inputs=user_input, outputs=output_audio, api_name="translate")
|
158 |
|
159 |
|
160 |
|
|
|
145 |
with gr.Row():
|
146 |
input = gr.Audio(label="Your Voice Chat", type="filepath", interactive=True, sources="microphone", waveform_options=False)
|
147 |
output = gr.Audio(label="Hermione", type="filepath", interactive=False, autoplay=True, elem_classes="audio")
|
148 |
+
gr.Interface(fn=respond, inputs=[input, language_code], outputs=output, live=False)
|
149 |
|
150 |
|
151 |
with gr.Row():
|
|
|
154 |
output_audio = gr.Audio(label="Hermione", type="filepath", interactive=False, autoplay=True, elem_classes="audio")
|
155 |
with gr.Row():
|
156 |
translate_btn = gr.Button("Response")
|
157 |
+
translate_btn.click(fn=generate1, inputs=[user_input, language_code], outputs=output_audio, api_name="translate")
|
158 |
|
159 |
|
160 |
|