kkngan commited on
Commit
cd28c36
·
verified ·
1 Parent(s): 3eea6be

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -10,7 +10,7 @@ def callback():
10
  st.audio(audio_bytes)
11
 
12
  def transcribe(upload):
13
- pipe = pipeline("automatic-speech-recognition", model="openai/whisper-base")
14
  result = pipe(upload, generate_kwargs={'task': 'transcribe'})
15
  print(result['text'])
16
  return result['text']
@@ -66,7 +66,7 @@ def main():
66
  if button:
67
  st.write('Loading')
68
  text = transcribe(upload=audio["bytes"])
69
- st.write(f'Speech-to-test Result:')
70
  st.write(f'{text}')
71
  model, tokenizer = load_model()
72
  prediction = predict(text=text, model=model, tokenizer=tokenizer)
 
10
  st.audio(audio_bytes)
11
 
12
  def transcribe(upload):
13
+ pipe = pipeline("automatic-speech-recognition", model="openai/whisper-large")
14
  result = pipe(upload, generate_kwargs={'task': 'transcribe'})
15
  print(result['text'])
16
  return result['text']
 
66
  if button:
67
  st.write('Loading')
68
  text = transcribe(upload=audio["bytes"])
69
+ st.write(f'Speech-to-text Result:')
70
  st.write(f'{text}')
71
  model, tokenizer = load_model()
72
  prediction = predict(text=text, model=model, tokenizer=tokenizer)