Spaces:
Running
Running
Update app.py
Browse fileswhisper.load_model
app.py
CHANGED
@@ -4,7 +4,7 @@ import whisper
|
|
4 |
import os
|
5 |
|
6 |
# 加載 Whisper 模型
|
7 |
-
model = whisper.
|
8 |
|
9 |
def transcribe(audio_file):
|
10 |
# 從 Gradio 文件輸入獲取文件路徑
|
|
|
4 |
import os
|
5 |
|
6 |
# 加載 Whisper 模型
|
7 |
+
model = whisper.load_model("large-v2", device="cuda" if torch.cuda.is_available() else "cpu")
|
8 |
|
9 |
def transcribe(audio_file):
|
10 |
# 從 Gradio 文件輸入獲取文件路徑
|