kh-CHEUNG commited on
Commit
9787b16
·
verified ·
1 Parent(s): 28ce15e

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -5
app.py CHANGED
@@ -83,9 +83,10 @@ def transcribe(inputs, task):
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 = gr.Audio(sources=["upload", "microphone"], type="filepath", label="Audio: from file")
88
- audio_input_choice = gr.Radio(["audio file", "microphone"], label="Audio Input Source", value="audio file") #
 
89
  task_input_choice = gr.Radio(["transcribe", "translate"], label="Task", value="transcribe")
90
 
91
  transcribe_interface = gr.Interface(
@@ -132,7 +133,7 @@ chat_interface = gr.ChatInterface(
132
  with gr.Blocks() as demo:
133
  gr.TabbedInterface([transcribe_interface, chat_interface], ["Step 1: Transcribe", "Step 2: Extract"])
134
 
135
-
136
  def clear_audio_input():
137
  return None
138
 
@@ -147,7 +148,7 @@ with gr.Blocks() as demo:
147
  inputs=audio_input_choice,
148
  outputs=audio_input
149
  )
150
-
151
 
152
  if __name__ == "__main__":
153
  demo.queue().launch() #demo.launch()
 
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
+
89
+ audio_input = gr.Audio(sources=["upload", "microphone"], type="filepath", label="Audio Input Source")
90
  task_input_choice = gr.Radio(["transcribe", "translate"], label="Task", value="transcribe")
91
 
92
  transcribe_interface = gr.Interface(
 
133
  with gr.Blocks() as demo:
134
  gr.TabbedInterface([transcribe_interface, chat_interface], ["Step 1: Transcribe", "Step 2: Extract"])
135
 
136
+ """
137
  def clear_audio_input():
138
  return None
139
 
 
148
  inputs=audio_input_choice,
149
  outputs=audio_input
150
  )
151
+ """
152
 
153
  if __name__ == "__main__":
154
  demo.queue().launch() #demo.launch()