Update app.py
Browse files
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(
|
|
|
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()
|