fiewolf1000 commited on
Commit
f93ad16
·
verified ·
1 Parent(s): aff3611

Update requirements.txt

Browse files
Files changed (1) hide show
  1. requirements.txt +6 -7
requirements.txt CHANGED
@@ -1,12 +1,11 @@
1
- # 强制指定 FastAPI 版本,确保包含 MarkdownResponse
 
 
2
  fastapi==0.100.0
3
- # 服务启动工具(与 FastAPI 0.100.0 兼容)
4
  uvicorn==0.23.2
5
- # 模型依赖(兼容版本)
6
  transformers==4.35.2
7
- # CPU 版本 PyTorch(避免 GPU 兼容问题,Hugging Face 免费版为 CPU 环境)
8
- torch==2.0.1+cpu; sys_platform == 'linux'
9
- # 解决 NumPy 2.x 兼容性问题
10
  numpy==1.26.4
11
- # 数据模型验证(与 FastAPI 0.100.0 兼容)
12
  pydantic==2.0.1
 
1
+ # 添加 PyTorch 官方 CPU 版本索引源(关键!)
2
+ --extra-index-url https://download.pytorch.org/whl/cpu
3
+ # 核心依赖
4
  fastapi==0.100.0
 
5
  uvicorn==0.23.2
 
6
  transformers==4.35.2
7
+ # 修正 PyTorch 版本(去掉 +cpu 后缀,通过上方索引源获取 CPU 版本)
8
+ torch==2.0.1
9
+ # 兼容的 NumPy 版本
10
  numpy==1.26.4
 
11
  pydantic==2.0.1