mohammed commited on
Commit
0d6ad87
·
verified ·
1 Parent(s): 39df384

fix the sources args

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -93,13 +93,13 @@ demo = gr.Blocks()
93
  mf_transcribe = gr.Interface(
94
  fn=transcribe,
95
  inputs=[
96
- gr.Audio(source="microphone", type="filepath", optional=True),
97
  gr.Radio(["transcribe", "translate"], label="Task", default="transcribe"),
98
  ],
99
  outputs="text",
100
  layout="horizontal",
101
  theme="huggingface",
102
- title="Whisper Large Arabic: Transcribe Audio",
103
  description=(
104
  "Transcribe long-form microphone or audio inputs with the click of a button! Demo uses the OpenAI Whisper"
105
  f" checkpoint [{MODEL_NAME}](https://huggingface.co/{MODEL_NAME}) and 🤗 Transformers to transcribe audio files"
@@ -111,7 +111,7 @@ mf_transcribe = gr.Interface(
111
  file_transcribe = gr.Interface(
112
  fn=transcribe,
113
  inputs=[
114
- gr.Audio(source="upload", type="filepath", optional=True, label="Audio file"),
115
  gr.Radio(["transcribe", "translate"], label="Task", default="transcribe"),
116
  ],
117
  outputs="text",
 
93
  mf_transcribe = gr.Interface(
94
  fn=transcribe,
95
  inputs=[
96
+ gr.Audio(sources=["microphone"], type="filepath"),
97
  gr.Radio(["transcribe", "translate"], label="Task", default="transcribe"),
98
  ],
99
  outputs="text",
100
  layout="horizontal",
101
  theme="huggingface",
102
+ title="Whisper Large Arabic: Transcribe Audio Microphone",
103
  description=(
104
  "Transcribe long-form microphone or audio inputs with the click of a button! Demo uses the OpenAI Whisper"
105
  f" checkpoint [{MODEL_NAME}](https://huggingface.co/{MODEL_NAME}) and 🤗 Transformers to transcribe audio files"
 
111
  file_transcribe = gr.Interface(
112
  fn=transcribe,
113
  inputs=[
114
+ gr.Audio(sources=["upload"], type="filepath", label="Audio file"),
115
  gr.Radio(["transcribe", "translate"], label="Task", default="transcribe"),
116
  ],
117
  outputs="text",