zeimoto commited on
Commit
3c58d70
·
verified ·
1 Parent(s): 272f1d8

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -6
app.py CHANGED
@@ -11,22 +11,18 @@ audio_transcription: str = None
11
 
12
  def main ():
13
 
14
- print("Run init model")
15
- pipe = init_model()
16
  print("Run init model")
17
  pipe = init_model()
18
  # x = st.slider('Select a value')
19
  # st.write(x, 'squared is', x * x)
20
 
21
- print("Render UI")
22
  print("Render UI")
23
  wav_audio_data = st_audiorec()
24
 
25
  if wav_audio_data is not None:
26
  print("Loading data...")
27
  st.audio(wav_audio_data, format='audio/wav')
28
- sample = transcribe(wav_audio_data, pipe)
29
- st.write('Sample:', sample)
30
 
31
 
32
 
@@ -71,7 +67,6 @@ def transcribe (audio_sample: bytes, pipe) -> str:
71
  print(result)
72
 
73
  st.write('Result', result["text"])
74
- return result["text"]
75
 
76
  if __name__ == "__main__":
77
  main()
 
11
 
12
  def main ():
13
 
 
 
14
  print("Run init model")
15
  pipe = init_model()
16
  # x = st.slider('Select a value')
17
  # st.write(x, 'squared is', x * x)
18
 
 
19
  print("Render UI")
20
  wav_audio_data = st_audiorec()
21
 
22
  if wav_audio_data is not None:
23
  print("Loading data...")
24
  st.audio(wav_audio_data, format='audio/wav')
25
+ transcribe(wav_audio_data, pipe)
 
26
 
27
 
28
 
 
67
  print(result)
68
 
69
  st.write('Result', result["text"])
 
70
 
71
  if __name__ == "__main__":
72
  main()