Spaces:
Runtime error
Runtime error
Commit
·
8cc6bda
1
Parent(s):
d197959
Update app.py
Browse files
app.py
CHANGED
@@ -1,22 +1,3 @@
|
|
1 |
-
# import gradio as gr
|
2 |
-
|
3 |
-
# gr.load("models/kanyekuthi/dsn_afrispeech").launch()
|
4 |
-
|
5 |
-
from transformers import pipeline
|
6 |
import gradio as gr
|
7 |
|
8 |
-
|
9 |
-
|
10 |
-
def transcribe(audio):
|
11 |
-
text = pipe(audio)["text"]
|
12 |
-
return text
|
13 |
-
|
14 |
-
iface = gr.Interface(
|
15 |
-
fn=transcribe,
|
16 |
-
inputs=gr.Audio(source="microphone", type="filepath"),
|
17 |
-
outputs="text",
|
18 |
-
title="Whisper Small English",
|
19 |
-
description="Realtime demo for African-accented English speech recognition using a fine-tuned Whisper small model.",
|
20 |
-
)
|
21 |
-
|
22 |
-
iface.launch()
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
import gradio as gr
|
2 |
|
3 |
+
gr.load("models/kanyekuthi/dsn_afrispeech").launch()
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|