hexular commited on
Commit
e824905
1 Parent(s): 9212547

Add explicit input

Browse files
Files changed (2) hide show
  1. .gitignore +4 -0
  2. app.py +9 -1
.gitignore ADDED
@@ -0,0 +1,4 @@
 
 
 
 
 
1
+ .env
2
+ env
3
+ __pycache__
4
+ *.wav
app.py CHANGED
@@ -1,3 +1,11 @@
1
  import gradio as gr
 
2
 
3
- gr.load("models/openai/whisper-large-v3").launch()
 
 
 
 
 
 
 
 
1
  import gradio as gr
2
+ from transformers import pipeline
3
 
4
+ pipe = pipeline("automatic-speech-recognition", model="openai/whisper-large-v3")
5
+
6
+ def transcribe(audio):
7
+ return pipe(audio)['text']
8
+
9
+ app = gr.Interface(transcribe, gr.Audio(sources=["microphone"]), outputs="textbox")
10
+
11
+ app.launch()