Vageesh1 commited on
Commit
c775084
·
1 Parent(s): e614cb1

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -3
app.py CHANGED
@@ -91,9 +91,10 @@ def ui():
91
  container = st.container()
92
 
93
  with container:
94
- audio_file = audiorecorder("Click to record", "Recording...")
95
- audio_file=audio_file.tobytes()
96
- submit_button = st.form_submit_button(label='Send')
 
97
  if submit_button and audio_file:
98
  output_file_path = "./output_audio.mp3"
99
  save_uploaded_file_as_mp3(audio_file,output_file_path )
 
91
  container = st.container()
92
 
93
  with container:
94
+ with st.form(key='my_form', clear_on_submit=True)
95
+ audio_file = audiorecorder("Click to record", "Recording...")
96
+ audio_file=audio_file.tobytes()
97
+ submit_button = st.form_submit_button(label='Send')
98
  if submit_button and audio_file:
99
  output_file_path = "./output_audio.mp3"
100
  save_uploaded_file_as_mp3(audio_file,output_file_path )