BoburAmirov commited on
Commit
6c48ea2
·
1 Parent(s): f07e6a2

lang code update

Browse files
Files changed (1) hide show
  1. app.py +12 -13
app.py CHANGED
@@ -118,16 +118,15 @@ def yt_transcribe(yt_url, task, return_timestamps, language, max_filesize=75.0):
118
  else:
119
  return html_embed_str, result['text']
120
 
121
-
122
  demo = gr.Blocks()
123
 
124
  mf_transcribe = gr.Interface(
125
  fn=transcribe,
126
  inputs=[
127
- gr.inputs.Audio(source="microphone", type="filepath", optional=True),
128
- gr.inputs.Radio(["transcribe", "translate"], label="Task", default="transcribe"),
129
- gr.inputs.Checkbox(label="Return timestamps"),
130
- gr.inputs.Dropdown(choices=["English", "Uzbek"], label="Language"),
131
  ],
132
  outputs="text",
133
  layout="horizontal",
@@ -143,10 +142,10 @@ mf_transcribe = gr.Interface(
143
  file_transcribe = gr.Interface(
144
  fn=transcribe,
145
  inputs=[
146
- gr.inputs.Audio(source="upload", type="filepath", optional=True, label="Audio file"),
147
- gr.inputs.Radio(["transcribe", "translate"], label="Task", default="transcribe"),
148
- gr.inputs.Checkbox(label="Return timestamps"),
149
- gr.inputs.Dropdown(choices=["English", "Uzbek"], label="Language"),
150
  ],
151
  outputs="text",
152
  layout="horizontal",
@@ -162,10 +161,10 @@ file_transcribe = gr.Interface(
162
  yt_transcribe = gr.Interface(
163
  fn=yt_transcribe,
164
  inputs=[
165
- gr.inputs.Textbox(lines=1, placeholder="Paste the URL to a YouTube video here", label="YouTube URL"),
166
- gr.inputs.Radio(["transcribe", "translate"], label="Task", default="transcribe"),
167
- gr.inputs.Checkbox(label="Return timestamps"),
168
- gr.inputs.Dropdown(choices=["English", "Uzbek"], label="Language"),
169
  ],
170
  outputs=["html", "text"],
171
  layout="horizontal",
 
118
  else:
119
  return html_embed_str, result['text']
120
 
 
121
  demo = gr.Blocks()
122
 
123
  mf_transcribe = gr.Interface(
124
  fn=transcribe,
125
  inputs=[
126
+ gr.Interface.Audio(source="microphone", type="filepath", optional=True),
127
+ gr.Interface.Radio(["transcribe", "translate"], label="Task", default="transcribe"),
128
+ gr.Interface.Checkbox(label="Return timestamps"),
129
+ gr.Interface.Dropdown(choices=["English", "Uzbek"], label="Language"),
130
  ],
131
  outputs="text",
132
  layout="horizontal",
 
142
  file_transcribe = gr.Interface(
143
  fn=transcribe,
144
  inputs=[
145
+ gr.Interface.Audio(source="upload", type="filepath", optional=True, label="Audio file"),
146
+ gr.Interface.Radio(["transcribe", "translate"], label="Task", default="transcribe"),
147
+ gr.Interface.Checkbox(label="Return timestamps"),
148
+ gr.Interface.Dropdown(choices=["English", "Uzbek"], label="Language"),
149
  ],
150
  outputs="text",
151
  layout="horizontal",
 
161
  yt_transcribe = gr.Interface(
162
  fn=yt_transcribe,
163
  inputs=[
164
+ gr.Interface.Textbox(lines=1, placeholder="Paste the URL to a YouTube video here", label="YouTube URL"),
165
+ gr.Interface.Radio(["transcribe", "translate"], label="Task", default="transcribe"),
166
+ gr.Interface.Checkbox(label="Return timestamps"),
167
+ gr.Interface.Dropdown(choices=["English", "Uzbek"], label="Language"),
168
  ],
169
  outputs=["html", "text"],
170
  layout="horizontal",