Create app.py
Browse files
app.py
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import whisper
|
| 2 |
+
import gradio as gr
|
| 3 |
+
|
| 4 |
+
model = whisper.load_model("base")
|
| 5 |
+
|
| 6 |
+
def transcribe(audio):
|
| 7 |
+
result = model.transcribe(audio)
|
| 8 |
+
return result["text"]
|
| 9 |
+
|
| 10 |
+
gr.Interface(fn=transcribe, inputs="audio", outputs="text").launch()
|