Spaces:
Runtime error
Runtime error
Commit
·
52394c1
1
Parent(s):
1fa0886
Update app.py
Browse files
app.py
CHANGED
@@ -90,12 +90,12 @@ with gr.Blocks(css=css) as demo:
|
|
90 |
with gr.Column(scale=0.8):
|
91 |
recorder = gr.Audio(source="microphone", type="filepath", show_label=False, visible=False).style(container=False)
|
92 |
|
93 |
-
action_btn =
|
94 |
def next_line(action, _):
|
95 |
if action == 'Start':
|
96 |
-
return {action_btn: 'Next', recorder:
|
97 |
else:
|
98 |
-
return {action_btn: 'Done', recorder:
|
99 |
|
100 |
with gr.Column(scale=0.2, min_width=0):
|
101 |
speech = gr.Button("Submit speech")
|
|
|
90 |
with gr.Column(scale=0.8):
|
91 |
recorder = gr.Audio(source="microphone", type="filepath", show_label=False, visible=False).style(container=False)
|
92 |
|
93 |
+
action_btn = gr.Button("Start recording...")
|
94 |
def next_line(action, _):
|
95 |
if action == 'Start':
|
96 |
+
return {action_btn: 'Next', recorder: gr.update(visible=True)}
|
97 |
else:
|
98 |
+
return {action_btn: 'Done', recorder: gr.update(visible=False)}
|
99 |
|
100 |
with gr.Column(scale=0.2, min_width=0):
|
101 |
speech = gr.Button("Submit speech")
|