Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -1,3 +1,4 @@
|
|
|
|
1 |
import gradio as gr
|
2 |
import librosa
|
3 |
|
@@ -6,7 +7,7 @@ from espnet2.bin.s2t_inference_language import Speech2Text as Speech2Lang
|
|
6 |
|
7 |
|
8 |
model_name_or_path = "espnet/owsm_v3"
|
9 |
-
device = "cuda"
|
10 |
|
11 |
speech2text = Speech2Text.from_pretrained(
|
12 |
model_name_or_path,
|
|
|
1 |
+
import torch
|
2 |
import gradio as gr
|
3 |
import librosa
|
4 |
|
|
|
7 |
|
8 |
|
9 |
model_name_or_path = "espnet/owsm_v3"
|
10 |
+
device = "cuda" if torch.cuda.is_available() else "cpu"
|
11 |
|
12 |
speech2text = Speech2Text.from_pretrained(
|
13 |
model_name_or_path,
|