feat(translator): 添加transformers作为备选模型加载方式

支持使用transformers库作为llama-cpp-python的备选方案加载模型
新增模型加载失败时的自动回退机制
更新requirements.txt添加transformers和torch依赖
This commit is contained in:
2026-01-16 11:08:34 +08:00
parent 1e7755f8e7
commit 2659fdd6ac
3 changed files with 107 additions and 33 deletions

View File

@@ -3,4 +3,6 @@ llama-cpp-python
python-docx
loguru
psutil
GPUtil
GPUtil
transformers
torch