Spaces:
Runtime error
Runtime error
SteveDigital
commited on
Commit
·
d1800c9
1
Parent(s):
9f2ec46
Update app.py
Browse files
app.py
CHANGED
@@ -1,18 +1,17 @@
|
|
1 |
import gradio as gr
|
2 |
import whisper
|
3 |
-
from langcodes import *
|
4 |
|
5 |
def speech_to_text(tmp_filename, uploaded, model_size):
|
6 |
model = whisper.load_model(model_size)
|
7 |
source = uploaded if uploaded is not None else tmp_filename
|
8 |
result = model.transcribe(source)
|
9 |
-
return f'
|
10 |
|
11 |
gr.Interface(
|
12 |
title="",
|
13 |
thumbnail="",
|
14 |
css="""
|
15 |
-
footer {visibility:
|
16 |
.gr-prose p{text-align: center;}
|
17 |
.gr-button {background: black;color: white}
|
18 |
""",
|
|
|
1 |
import gradio as gr
|
2 |
import whisper
|
|
|
3 |
|
4 |
def speech_to_text(tmp_filename, uploaded, model_size):
|
5 |
model = whisper.load_model(model_size)
|
6 |
source = uploaded if uploaded is not None else tmp_filename
|
7 |
result = model.transcribe(source)
|
8 |
+
return f'{result["text"]}'
|
9 |
|
10 |
gr.Interface(
|
11 |
title="",
|
12 |
thumbnail="",
|
13 |
css="""
|
14 |
+
footer {visibility: xhidden}
|
15 |
.gr-prose p{text-align: center;}
|
16 |
.gr-button {background: black;color: white}
|
17 |
""",
|