CineAI commited on
Commit
9bb15cf
·
verified ·
1 Parent(s): 0560145

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +9 -3
app.py CHANGED
@@ -11,9 +11,15 @@ audio = audiorecorder("Click to record", "Click to stop recording")
11
 
12
  def main():
13
  if len(audio) > 0:
14
- a2t = A2T(audio)
15
- text = a2t.predict()
16
- st.write(text)
 
 
 
 
 
 
17
 
18
  if __name__ == "__main__":
19
  main()
 
11
 
12
  def main():
13
  if len(audio) > 0:
14
+ if st.button("Get text"):
15
+ with st.spinner("Wait for it...."):
16
+ a2t = A2T(audio)
17
+ print(a2t)
18
+ text = a2t.predict()
19
+ st.write(text)
20
+ st.success("Done")
21
+ else:
22
+ print("error")
23
 
24
  if __name__ == "__main__":
25
  main()