Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -4,10 +4,13 @@ import gradio as gr
|
|
4 |
pipe = pipeline(model="Hoft/whisper-small-swedish-asr") # change to "your-username/the-name-you-picked"
|
5 |
|
6 |
def transcribe(audio, file):
|
7 |
-
print(audio)
|
8 |
-
|
9 |
-
|
10 |
-
|
|
|
|
|
|
|
11 |
|
12 |
iface = gr.Interface(
|
13 |
fn=transcribe,
|
|
|
4 |
pipe = pipeline(model="Hoft/whisper-small-swedish-asr") # change to "your-username/the-name-you-picked"
|
5 |
|
6 |
def transcribe(audio, file):
|
7 |
+
print(audio, file)
|
8 |
+
if audio is not None:
|
9 |
+
text = pipe(audio)["text"]
|
10 |
+
return text
|
11 |
+
if file is not None:
|
12 |
+
text = pipe(file)["text"]
|
13 |
+
return text
|
14 |
|
15 |
iface = gr.Interface(
|
16 |
fn=transcribe,
|