patrickvonplaten commited on
Commit
1ac2ade
1 Parent(s): 9e02a9f

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -2
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
- target_languages = [
30
  "German (de)",
31
  "Turkish (tr)",
32
  "Persian (fa)",
@@ -66,10 +66,12 @@ iface = gr.Interface(
66
  fn=transcribe,
67
  inputs=[
68
  gr.inputs.Audio(source="microphone", type='filepath'),
69
- gr.inputs.Dropdown(target_languages),
70
  ],
71
  outputs="text",
72
  layout="horizontal",
73
  theme="huggingface",
 
 
74
  )
75
  iface.launch()
 
26
  transcription = tokenizer.batch_decode(sequences, skip_special_tokens=True)
27
  return transcription[0]
28
 
29
+ target_lang = [
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_lang),
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()