Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -130,12 +130,16 @@ chat_interface = gr.ChatInterface(
|
|
130 |
|
131 |
with gr.Blocks() as demo:
|
132 |
gr.TabbedInterface([transcribe_interface, chat_interface], ["Step 1: Transcribe", "Step 2: Extract"])
|
133 |
-
|
134 |
def update_audio_input(audio_input_choice):
|
135 |
if audio_input_choice == "audio file":
|
136 |
return gr.Audio(sources="upload", type="filepath", label="Audio: from file")
|
137 |
elif audio_input_choice == "microphone":
|
138 |
return gr.Audio(sources="microphone", type="filepath", label="Audio: from microphone")
|
|
|
|
|
|
|
|
|
139 |
|
140 |
|
141 |
if __name__ == "__main__":
|
|
|
130 |
|
131 |
with gr.Blocks() as demo:
|
132 |
gr.TabbedInterface([transcribe_interface, chat_interface], ["Step 1: Transcribe", "Step 2: Extract"])
|
133 |
+
|
134 |
def update_audio_input(audio_input_choice):
|
135 |
if audio_input_choice == "audio file":
|
136 |
return gr.Audio(sources="upload", type="filepath", label="Audio: from file")
|
137 |
elif audio_input_choice == "microphone":
|
138 |
return gr.Audio(sources="microphone", type="filepath", label="Audio: from microphone")
|
139 |
+
audio_input_choice.input(fn=update_audio_input,
|
140 |
+
inputs=audio_input_choice,
|
141 |
+
outputs=audio_input
|
142 |
+
)
|
143 |
|
144 |
|
145 |
if __name__ == "__main__":
|