gstaff commited on
Commit
b506969
β€’
1 Parent(s): 45e1616

Fix audio clear params.

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -193,8 +193,8 @@ with gr.Blocks() as demo:
193
  code_area = gr.Code(label="App Code - You can also edit directly and then click Update App", language='python', value=starting_app_code)
194
  update_btn = gr.Button("Update App", variant="primary")
195
  update_btn.click(None, inputs=code_area, outputs=None, _js=update_iframe_js)
196
- in_prompt.submit(generate_text, [code_area, in_prompt], [out_text, code_area]).then(None, inputs=code_area, outputs=None, _js=update_iframe_js)
197
- in_audio.stop_recording(transcribe, [in_audio], [in_prompt]).then(generate_text, [code_area, in_prompt, in_audio], [out_text, code_area]).then(None, inputs=code_area, outputs=None, _js=update_iframe_js)
198
  with gr.Row():
199
  with gr.Column():
200
  gr.Markdown("## 3. Export your app to share!")
 
193
  code_area = gr.Code(label="App Code - You can also edit directly and then click Update App", language='python', value=starting_app_code)
194
  update_btn = gr.Button("Update App", variant="primary")
195
  update_btn.click(None, inputs=code_area, outputs=None, _js=update_iframe_js)
196
+ in_prompt.submit(generate_text, [code_area, in_prompt], [out_text, code_area, in_audio]).then(None, inputs=code_area, outputs=None, _js=update_iframe_js)
197
+ in_audio.stop_recording(transcribe, [in_audio], [in_prompt]).then(generate_text, [code_area, in_prompt], [out_text, code_area, in_audio]).then(None, inputs=code_area, outputs=None, _js=update_iframe_js)
198
  with gr.Row():
199
  with gr.Column():
200
  gr.Markdown("## 3. Export your app to share!")