Spaces:
Runtime error
Runtime error
Commit
·
bce4717
1
Parent(s):
e8b7055
Create app.py
Browse files
app.py
ADDED
@@ -0,0 +1,16 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
import gradio as gr
|
2 |
+
|
3 |
+
def greet(audio):
|
4 |
+
model = whisper.load_model("base")
|
5 |
+
|
6 |
+
audio = whisper.load_audio(audio)
|
7 |
+
result1= model.transcribe(audio)
|
8 |
+
#print (result1["text"])
|
9 |
+
return result1["text"]
|
10 |
+
|
11 |
+
demo = gr.Interface(
|
12 |
+
fn=greet,
|
13 |
+
inputs=gr.Audio(source="upload",type="filepath"),
|
14 |
+
outputs="text",
|
15 |
+
)
|
16 |
+
demo.launch()
|