Spaces:
Runtime error
Runtime error
jpdiazpardo
commited on
Commit
•
221b047
1
Parent(s):
c1335fa
Update app.py
Browse files
app.py
CHANGED
@@ -1,10 +1,12 @@
|
|
1 |
import gradio as gr
|
|
|
2 |
|
3 |
-
|
4 |
model="openai/whisper-medium",
|
5 |
chunk_length_s=30,
|
6 |
device=device,
|
7 |
batch_size=8,
|
8 |
)
|
9 |
|
10 |
-
iface = gr.Interface.from_pipeline(
|
|
|
|
1 |
import gradio as gr
|
2 |
+
from transformers import pipeline
|
3 |
|
4 |
+
pipeline = pipeline("automatic-speech-recognition",
|
5 |
model="openai/whisper-medium",
|
6 |
chunk_length_s=30,
|
7 |
device=device,
|
8 |
batch_size=8,
|
9 |
)
|
10 |
|
11 |
+
iface = gr.Interface.from_pipeline(pipeline, inputs= gr.inputs.Audio(source="upload", type="filepath"), title="Audio Transcription App")
|
12 |
+
iface.launch(debug=True)
|