Update app.py
Browse files
app.py
CHANGED
@@ -119,23 +119,16 @@ with gr.Blocks(css="style.css") as demo:
|
|
119 |
### <center>Now Talk to - Dr. Watson</center>
|
120 |
""")
|
121 |
with gr.Row():
|
122 |
-
user_input
|
123 |
-
output_audio = gr.Audio(label="WATSON",
|
124 |
-
interactive=True,
|
125 |
-
autoplay=True,
|
126 |
-
elem_classes="microphone")
|
127 |
with gr.Row():
|
128 |
translate_btn = gr.Button("Response")
|
129 |
-
translate_btn.click(fn=respond, inputs=user_input,
|
130 |
-
outputs=output_audio, api_name=False)
|
131 |
|
132 |
with gr.Row():
|
133 |
-
user_input
|
134 |
-
input_text
|
135 |
-
output_audio = gr.Audio(label="WATSON",
|
136 |
-
interactive=False,
|
137 |
-
autoplay=True,
|
138 |
-
elem_classes="audio")
|
139 |
with gr.Row():
|
140 |
translate_btn = gr.Button("Response")
|
141 |
translate_btn.click(fn=generate1, inputs=user_input, outputs=output_audio, api_name="translate")
|
|
|
119 |
### <center>Now Talk to - Dr. Watson</center>
|
120 |
""")
|
121 |
with gr.Row():
|
122 |
+
user_input = gr.Audio( label="Your Voice Chat", type="filepath", interactive=True, elem_classes="microphone" )
|
123 |
+
output_audio = gr.Audio( label="WATSON", type="filepath", interactive=False, elem_classes="audio", autoplay=True )
|
|
|
|
|
|
|
124 |
with gr.Row():
|
125 |
translate_btn = gr.Button("Response")
|
126 |
+
translate_btn.click( fn=respond, inputs=user_input, outputs=output_audio, api_name=False )
|
|
|
127 |
|
128 |
with gr.Row():
|
129 |
+
user_input = gr.Textbox( label="Your Question", value="Dr. Watson can you summarize your adventures with Sherlock Holmes?")
|
130 |
+
input_text = gr.Textbox( label="Input Text", elem_id="important")
|
131 |
+
output_audio = gr.Audio( label="WATSON", type="filepath", interactive=False, elem_classes="audio", autoplay=True )
|
|
|
|
|
|
|
132 |
with gr.Row():
|
133 |
translate_btn = gr.Button("Response")
|
134 |
translate_btn.click(fn=generate1, inputs=user_input, outputs=output_audio, api_name="translate")
|