Spaces:
Sleeping
Sleeping
StevenChen16
commited on
Commit
•
9a9ac31
1
Parent(s):
ed18e86
Update app.py
Browse files
app.py
CHANGED
@@ -16,7 +16,11 @@ YT_LENGTH_LIMIT_S = 3600 # 1 hour YouTube files
|
|
16 |
|
17 |
# 加载WhisperX模型
|
18 |
@spaces.GPU
|
19 |
-
|
|
|
|
|
|
|
|
|
20 |
|
21 |
@spaces.GPU
|
22 |
def transcribe(inputs, task):
|
|
|
16 |
|
17 |
# 加载WhisperX模型
|
18 |
@spaces.GPU
|
19 |
+
def load_whisperx_model():
|
20 |
+
# 加载 WhisperX 模型
|
21 |
+
return whisperx.load_model(MODEL_NAME, device=device, compute_type=compute_type)
|
22 |
+
|
23 |
+
model = load_whisperx_model()
|
24 |
|
25 |
@spaces.GPU
|
26 |
def transcribe(inputs, task):
|