beeguy commited on
Commit
2c98115
·
1 Parent(s): deaa5e4

conditions

Browse files
Files changed (1) hide show
  1. app.py +5 -3
app.py CHANGED
@@ -8,10 +8,12 @@ audio_to_text = pipeline("automatic-speech-recognition")
8
 
9
  audio_file = st.file_uploader("Upload an audio file", type=["wav", "mp3", "ogg"])
10
 
11
- text = audio_to_text(audio_file)
 
 
 
 
12
 
13
- st.write("Here is the text:")
14
- st.write(text)
15
 
16
 
17
 
 
8
 
9
  audio_file = st.file_uploader("Upload an audio file", type=["wav", "mp3", "ogg"])
10
 
11
+ if audio_file:
12
+ text = audio_to_text(audio_file)
13
+ if text:
14
+ st.write("Here is the text:")
15
+ st.write(text)
16
 
 
 
17
 
18
 
19