StevenChen16 commited on
Commit
9a9ac31
1 Parent(s): ed18e86

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -1
app.py CHANGED
@@ -16,7 +16,11 @@ YT_LENGTH_LIMIT_S = 3600 # 1 hour YouTube files
16
 
17
  # 加载WhisperX模型
18
  @spaces.GPU
19
- model = whisperx.load_model(MODEL_NAME, device=device, compute_type=compute_type)
 
 
 
 
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):