Spaces:
Runtime error
Runtime error
linshoufan
commited on
Commit
•
2fd465a
1
Parent(s):
3de2b8e
Update app.py
Browse files
app.py
CHANGED
@@ -3,11 +3,11 @@ import gradio as gr
|
|
3 |
from pytube import YouTube
|
4 |
from transformers import pipeline
|
5 |
|
6 |
-
MODEL_NAME = "linshoufan/
|
7 |
lang = "chinese"
|
8 |
|
9 |
# 根據是否有可用的 CUDA 設備來選擇設備
|
10 |
-
device = 0 if torch.cuda.is_available() else "
|
11 |
|
12 |
# 初始化 pipeline,指定任務、模型和設備
|
13 |
pipe = pipeline(
|
|
|
3 |
from pytube import YouTube
|
4 |
from transformers import pipeline
|
5 |
|
6 |
+
MODEL_NAME = "linshoufan/linshoufanfork-whisper-small-nan-tw"
|
7 |
lang = "chinese"
|
8 |
|
9 |
# 根據是否有可用的 CUDA 設備來選擇設備
|
10 |
+
device = 0 if torch.cuda.is_available() else "cpu"
|
11 |
|
12 |
# 初始化 pipeline,指定任務、模型和設備
|
13 |
pipe = pipeline(
|