Skip to content

利用 AI 大模型和自动化工作流,根据主题或关键词一键生成高清短视频。Generate HD short videos from a topic or keyword with an automated AI workflow.

set local_files_only=True when downloading whisper model

harry4aa820b2005a
diff --git a/app/services/subtitle.py b/app/services/subtitle.py
index 0573cd0c..df929f44 100644
--- a/app/services/subtitle.py
+++ b/app/services/subtitle.py
@@ -18,7 +18,10 @@ def create(audio_file, subtitle_file: str = ""):
global model
if not model:
logger.info(f"loading model: {model_size}, device: {device}, compute_type: {compute_type}")
- model = WhisperModel(model_size_or_path=model_size, device=device, compute_type=compute_type)
+ model = WhisperModel(model_size_or_path=model_size,
+ device=device,
+ compute_type=compute_type,
+ local_files_only=True)
logger.info(f"start, output file: {subtitle_file}")
if not subtitle_file: