kh-CHEUNG commited on
Commit
3cb10e8
1 Parent(s): cfc0510

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -1
app.py CHANGED
@@ -76,13 +76,14 @@ def respond(
76
 
77
  @spaces.GPU
78
  def transcribe(asr_inputs, task):
79
- if inputs is None:
80
  raise gr.Error("No audio file submitted! Please upload or record an audio file before submitting your request.")
81
 
82
  text = asr_pl(asr_inputs, batch_size=BATCH_SIZE, generate_kwargs={"task": task}, return_timestamps=True)["text"]
83
  return text
84
 
85
 
 
86
  #audio_input = gr.Audio(sources="upload", type="filepath", label="Audio: from file") #gr.Audio(sources="microphone", type="filepath", label="Audio: from microphone")
87
  #audio_input_choice = gr.Radio(["audio file", "microphone"], label="Audio Input Source", value="audio file") #
88
 
 
76
 
77
  @spaces.GPU
78
  def transcribe(asr_inputs, task):
79
+ if asr_inputs is None:
80
  raise gr.Error("No audio file submitted! Please upload or record an audio file before submitting your request.")
81
 
82
  text = asr_pl(asr_inputs, batch_size=BATCH_SIZE, generate_kwargs={"task": task}, return_timestamps=True)["text"]
83
  return text
84
 
85
 
86
+ """Gradio User Interface"""
87
  #audio_input = gr.Audio(sources="upload", type="filepath", label="Audio: from file") #gr.Audio(sources="microphone", type="filepath", label="Audio: from microphone")
88
  #audio_input_choice = gr.Radio(["audio file", "microphone"], label="Audio Input Source", value="audio file") #
89