Spaces:
Runtime error
Runtime error
Commit
•
d07bdae
1
Parent(s):
123f1ce
Update app.py
Browse files
app.py
CHANGED
@@ -180,74 +180,6 @@ with gr.Blocks(css="style.css") as demo:
|
|
180 |
)
|
181 |
output_text = gr.Textbox(label="Translated text")
|
182 |
|
183 |
-
with gr.Row(visible=False) as s2st_example_row:
|
184 |
-
s2st_examples = gr.Examples(
|
185 |
-
examples=[
|
186 |
-
["assets/sample_input.mp3", "French"],
|
187 |
-
["assets/sample_input.mp3", "Mandarin Chinese"],
|
188 |
-
["assets/sample_input_2.mp3", "Hindi"],
|
189 |
-
["assets/sample_input_2.mp3", "Spanish"],
|
190 |
-
],
|
191 |
-
inputs=[input_audio_file, target_language],
|
192 |
-
outputs=[output_audio, output_text],
|
193 |
-
fn=process_s2st_example,
|
194 |
-
cache_examples=CACHE_EXAMPLES,
|
195 |
-
)
|
196 |
-
with gr.Row(visible=False) as s2tt_example_row:
|
197 |
-
s2tt_examples = gr.Examples(
|
198 |
-
examples=[
|
199 |
-
["assets/sample_input.mp3", "French"],
|
200 |
-
["assets/sample_input.mp3", "Mandarin Chinese"],
|
201 |
-
["assets/sample_input_2.mp3", "Hindi"],
|
202 |
-
["assets/sample_input_2.mp3", "Spanish"],
|
203 |
-
],
|
204 |
-
inputs=[input_audio_file, target_language],
|
205 |
-
outputs=[output_audio, output_text],
|
206 |
-
fn=process_s2tt_example,
|
207 |
-
cache_examples=CACHE_EXAMPLES,
|
208 |
-
)
|
209 |
-
with gr.Row(visible=False) as t2st_example_row:
|
210 |
-
t2st_examples = gr.Examples(
|
211 |
-
examples=[
|
212 |
-
["My favorite animal is the elephant.", "English", "French"],
|
213 |
-
["My favorite animal is the elephant.", "English", "Mandarin Chinese"],
|
214 |
-
[
|
215 |
-
"Meta AI's Seamless M4T model is democratising spoken communication across language barriers",
|
216 |
-
"English",
|
217 |
-
"Hindi",
|
218 |
-
],
|
219 |
-
[
|
220 |
-
"Meta AI's Seamless M4T model is democratising spoken communication across language barriers",
|
221 |
-
"English",
|
222 |
-
"Spanish",
|
223 |
-
],
|
224 |
-
],
|
225 |
-
inputs=[input_text, source_language, target_language],
|
226 |
-
outputs=[output_audio, output_text],
|
227 |
-
fn=process_t2st_example,
|
228 |
-
cache_examples=CACHE_EXAMPLES,
|
229 |
-
)
|
230 |
-
with gr.Row(visible=False) as t2tt_example_row:
|
231 |
-
t2tt_examples = gr.Examples(
|
232 |
-
examples=[
|
233 |
-
["My favorite animal is the elephant.", "English", "French"],
|
234 |
-
["My favorite animal is the elephant.", "English", "Mandarin Chinese"],
|
235 |
-
[
|
236 |
-
"Meta AI's Seamless M4T model is democratising spoken communication across language barriers",
|
237 |
-
"English",
|
238 |
-
"Hindi",
|
239 |
-
],
|
240 |
-
[
|
241 |
-
"Meta AI's Seamless M4T model is democratising spoken communication across language barriers",
|
242 |
-
"English",
|
243 |
-
"Spanish",
|
244 |
-
],
|
245 |
-
],
|
246 |
-
inputs=[input_text, source_language, target_language],
|
247 |
-
outputs=[output_audio, output_text],
|
248 |
-
fn=process_t2tt_example,
|
249 |
-
cache_examples=CACHE_EXAMPLES,
|
250 |
-
)
|
251 |
with gr.Row(visible=False) as asr_example_row:
|
252 |
asr_examples = gr.Examples(
|
253 |
examples=[
|
@@ -291,10 +223,6 @@ with gr.Blocks(css="style.css") as demo:
|
|
291 |
fn=update_example_ui,
|
292 |
inputs=task_name,
|
293 |
outputs=[
|
294 |
-
s2st_example_row,
|
295 |
-
s2tt_example_row,
|
296 |
-
t2st_example_row,
|
297 |
-
t2tt_example_row,
|
298 |
asr_example_row,
|
299 |
],
|
300 |
queue=False,
|
|
|
180 |
)
|
181 |
output_text = gr.Textbox(label="Translated text")
|
182 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
183 |
with gr.Row(visible=False) as asr_example_row:
|
184 |
asr_examples = gr.Examples(
|
185 |
examples=[
|
|
|
223 |
fn=update_example_ui,
|
224 |
inputs=task_name,
|
225 |
outputs=[
|
|
|
|
|
|
|
|
|
226 |
asr_example_row,
|
227 |
],
|
228 |
queue=False,
|