bofenghuang commited on
Commit
3e0e1ab
·
1 Parent(s): 3fb4d4b
Files changed (1) hide show
  1. run_demo_multi_models.py +8 -8
run_demo_multi_models.py CHANGED
@@ -110,12 +110,12 @@ demo = gr.Blocks()
110
  mf_transcribe = gr.Interface(
111
  fn=transcribe,
112
  inputs=[
113
- gr.Audio(source="microphone", type="filepath", optional=True, label="Record"),
114
- gr.Audio(source="upload", type="filepath", optional=True, label="Upload File"),
115
- gr.Dropdown(choices=MODEL_NAMES, default=DEFAULT_MODEL_NAME, label="Whisper Model"),
116
  ],
117
  # outputs="text",
118
- outputs=gr.Textbox(label="Transcription"),
119
  layout="horizontal",
120
  theme="huggingface",
121
  title="Whisper Demo: Transcribe Audio",
@@ -126,13 +126,13 @@ mf_transcribe = gr.Interface(
126
  yt_transcribe = gr.Interface(
127
  fn=yt_transcribe,
128
  inputs=[
129
- gr.Textbox(lines=1, placeholder="Paste the URL to a YouTube video here", label="YouTube URL"),
130
- gr.Dropdown(choices=MODEL_NAMES, default=DEFAULT_MODEL_NAME, label="Whisper Model"),
131
  ],
132
  # outputs=["html", "text"],
133
  outputs=[
134
- gr.HTML(label="YouTube Page"),
135
- gr.Textbox(label="Transcription"),
136
  ],
137
  layout="horizontal",
138
  theme="huggingface",
 
110
  mf_transcribe = gr.Interface(
111
  fn=transcribe,
112
  inputs=[
113
+ gr.inputs.Audio(source="microphone", type="filepath", optional=True, label="Record"),
114
+ gr.inputs.Audio(source="upload", type="filepath", optional=True, label="Upload File"),
115
+ gr.inputs.Dropdown(choices=MODEL_NAMES, default=DEFAULT_MODEL_NAME, label="Whisper Model"),
116
  ],
117
  # outputs="text",
118
+ outputs=gr.outputs.Textbox(label="Transcription"),
119
  layout="horizontal",
120
  theme="huggingface",
121
  title="Whisper Demo: Transcribe Audio",
 
126
  yt_transcribe = gr.Interface(
127
  fn=yt_transcribe,
128
  inputs=[
129
+ gr.inputs.Textbox(lines=1, placeholder="Paste the URL to a YouTube video here", label="YouTube URL"),
130
+ gr.inputs.Dropdown(choices=MODEL_NAMES, default=DEFAULT_MODEL_NAME, label="Whisper Model"),
131
  ],
132
  # outputs=["html", "text"],
133
  outputs=[
134
+ gr.outputs.HTML(label="YouTube Page"),
135
+ gr.outputs.Textbox(label="Transcription"),
136
  ],
137
  layout="horizontal",
138
  theme="huggingface",