Spaces:
Build error
Build error
patrickvonplaten
commited on
Commit
·
4eef8ac
1
Parent(s):
1ac2ade
Update app.py
Browse files
app.py
CHANGED
@@ -26,7 +26,7 @@ def transcribe(target_language, file):
|
|
26 |
transcription = tokenizer.batch_decode(sequences, skip_special_tokens=True)
|
27 |
return transcription[0]
|
28 |
|
29 |
-
|
30 |
"German (de)",
|
31 |
"Turkish (tr)",
|
32 |
"Persian (fa)",
|
@@ -66,12 +66,12 @@ iface = gr.Interface(
|
|
66 |
fn=transcribe,
|
67 |
inputs=[
|
68 |
gr.inputs.Audio(source="microphone", type='filepath'),
|
69 |
-
gr.inputs.Dropdown(
|
70 |
],
|
71 |
outputs="text",
|
72 |
layout="horizontal",
|
73 |
theme="huggingface",
|
74 |
-
title="English-X Speech Translator XLS-R 300M"
|
75 |
-
description="A simple interface to translate English Speech to 15 possible languages."
|
76 |
)
|
77 |
iface.launch()
|
|
|
26 |
transcription = tokenizer.batch_decode(sequences, skip_special_tokens=True)
|
27 |
return transcription[0]
|
28 |
|
29 |
+
target_language = [
|
30 |
"German (de)",
|
31 |
"Turkish (tr)",
|
32 |
"Persian (fa)",
|
|
|
66 |
fn=transcribe,
|
67 |
inputs=[
|
68 |
gr.inputs.Audio(source="microphone", type='filepath'),
|
69 |
+
gr.inputs.Dropdown(target_language),
|
70 |
],
|
71 |
outputs="text",
|
72 |
layout="horizontal",
|
73 |
theme="huggingface",
|
74 |
+
title="English-X Speech Translator XLS-R 300M",
|
75 |
+
description="A simple interface to translate English Speech to 15 possible languages.",
|
76 |
)
|
77 |
iface.launch()
|