Spaces:
Sleeping
Sleeping
Srivatsa Kundurthy
commited on
Commit
•
ac1dae2
1
Parent(s):
4ca677f
update import
Browse files
app.py
CHANGED
@@ -1,8 +1,11 @@
|
|
1 |
import gradio as gr
|
2 |
from transformers import pipeline
|
|
|
|
|
3 |
|
4 |
wav2_ft = pipeline("automatic-speech-recognition",model='sanchit-gandhi/wav2vec2-large-tedlium',device=device,trust_remote_code=True)
|
5 |
|
|
|
6 |
app = gr.Blocks()
|
7 |
|
8 |
def inference(path):
|
|
|
1 |
import gradio as gr
|
2 |
from transformers import pipeline
|
3 |
+
import torch
|
4 |
+
device = "cuda:0" if torch.cuda.is_available() else "cpu"
|
5 |
|
6 |
wav2_ft = pipeline("automatic-speech-recognition",model='sanchit-gandhi/wav2vec2-large-tedlium',device=device,trust_remote_code=True)
|
7 |
|
8 |
+
|
9 |
app = gr.Blocks()
|
10 |
|
11 |
def inference(path):
|