Spaces:
Runtime error
Runtime error
Commit
•
f0c8a8f
1
Parent(s):
9a915c6
Update app.py
Browse files
app.py
CHANGED
@@ -1,12 +1,10 @@
|
|
1 |
import gradio as gr
|
2 |
from transformers import pipeline
|
3 |
|
4 |
-
device = "cuda:0" if torch.cuda.is_available() else "cpu"
|
5 |
-
|
6 |
pipeline = pipeline("automatic-speech-recognition",
|
7 |
model="openai/whisper-medium",
|
8 |
chunk_length_s=30,
|
9 |
-
batch_size=8
|
10 |
)
|
11 |
|
12 |
iface = gr.Interface.from_pipeline(pipeline, inputs= gr.inputs.Audio(source="upload", type="filepath"), title="Audio Transcription App")
|
|
|
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 |
+
batch_size=8
|
8 |
)
|
9 |
|
10 |
iface = gr.Interface.from_pipeline(pipeline, inputs= gr.inputs.Audio(source="upload", type="filepath"), title="Audio Transcription App")
|