alviadn commited on
Commit
8330245
β€’
1 Parent(s): d443274

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -4
app.py CHANGED
@@ -3,15 +3,13 @@ from transformers import pipeline
3
 
4
 
5
  model = pipeline(task="automatic-speech-recognition",
6
- gr.Interface.load("models/facebook/s2t-medium-librispeech-asr")
7
-
8
 
9
  def predict_speech_to_text(audio):
10
  prediction = model(audio)
11
  text = prediction['text']
12
  return text
13
 
14
-
15
  gr.Interface(fn=predict_speech_to_text,
16
  title="πŸ§‘πŸ½β€πŸŽ€ PROLOVE πŸ₯°πŸ˜˜ ",
17
  inputs=gr.inputs.Audio(
@@ -20,4 +18,4 @@ gr.Interface(fn=predict_speech_to_text,
20
  description="This application was created to help correct pronouncation",
21
  examples=['Good night_alvi.wav'],
22
  allow_flagging='never'
23
- ).launch(share=True)
 
3
 
4
 
5
  model = pipeline(task="automatic-speech-recognition",
 
 
6
 
7
  def predict_speech_to_text(audio):
8
  prediction = model(audio)
9
  text = prediction['text']
10
  return text
11
 
12
+ gr.Interface.load("models/facebook/s2t-medium-librispeech-asr")
13
  gr.Interface(fn=predict_speech_to_text,
14
  title="πŸ§‘πŸ½β€πŸŽ€ PROLOVE πŸ₯°πŸ˜˜ ",
15
  inputs=gr.inputs.Audio(
 
18
  description="This application was created to help correct pronouncation",
19
  examples=['Good night_alvi.wav'],
20
  allow_flagging='never'
21
+ ).launch()