sanchit-gandhi HF staff commited on
Commit
7d1c3ad
1 Parent(s): 12306bd

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -5
app.py CHANGED
@@ -95,8 +95,8 @@ demo = gr.Blocks()
95
  mf_transcribe = gr.Interface(
96
  fn=transcribe,
97
  inputs=[
98
- gr.inputs.Audio(source="microphone", type="filepath", optional=True),
99
- gr.inputs.Radio(["transcribe", "translate"], label="Task", default="transcribe"),
100
  ],
101
  outputs="text",
102
  layout="horizontal",
@@ -113,8 +113,8 @@ mf_transcribe = gr.Interface(
113
  file_transcribe = gr.Interface(
114
  fn=transcribe,
115
  inputs=[
116
- gr.inputs.Audio(source="upload", type="filepath", optional=True, label="Audio file"),
117
- gr.inputs.Radio(["transcribe", "translate"], label="Task", default="transcribe"),
118
  ],
119
  outputs="text",
120
  layout="horizontal",
@@ -132,7 +132,7 @@ yt_transcribe = gr.Interface(
132
  fn=yt_transcribe,
133
  inputs=[
134
  gr.inputs.Textbox(lines=1, placeholder="Paste the URL to a YouTube video here", label="YouTube URL"),
135
- gr.inputs.Radio(["transcribe", "translate"], label="Task", default="transcribe")
136
  ],
137
  outputs=["html", "text"],
138
  layout="horizontal",
 
95
  mf_transcribe = gr.Interface(
96
  fn=transcribe,
97
  inputs=[
98
+ gr.inputs.Audio(sources="microphone", type="filepath),
99
+ gr.inputs.Radio(["transcribe", "translate"], label="Task", value="transcribe"),
100
  ],
101
  outputs="text",
102
  layout="horizontal",
 
113
  file_transcribe = gr.Interface(
114
  fn=transcribe,
115
  inputs=[
116
+ gr.inputs.Audio(sources="upload", type="filepath", label="Audio file"),
117
+ gr.inputs.Radio(["transcribe", "translate"], label="Task", value="transcribe"),
118
  ],
119
  outputs="text",
120
  layout="horizontal",
 
132
  fn=yt_transcribe,
133
  inputs=[
134
  gr.inputs.Textbox(lines=1, placeholder="Paste the URL to a YouTube video here", label="YouTube URL"),
135
+ gr.inputs.Radio(["transcribe", "translate"], label="Task", value="transcribe")
136
  ],
137
  outputs=["html", "text"],
138
  layout="horizontal",