Spaces:
Sleeping
Sleeping
Update app.py
Browse files
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-
|
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-
|
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)
|