pratikshahp commited on
Commit
a1c0ebf
·
verified ·
1 Parent(s): 7f020a5

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -1
app.py CHANGED
@@ -22,6 +22,9 @@ if audio_bytes:
22
  # Decode the audio to generate text
23
  transcriptions = tokenizer.decode(predicted_ids[0])
24
 
25
- st.write(transcriptions)
 
 
 
26
  else:
27
  st.write("No audio recorded.")
 
22
  # Decode the audio to generate text
23
  transcriptions = tokenizer.decode(predicted_ids[0])
24
 
25
+ if transcriptions is not None:
26
+ st.write(transcriptions)
27
+ else:
28
+ st.write("Error: Failed to decode audio.")
29
  else:
30
  st.write("No audio recorded.")