Spaces:
Sleeping
Sleeping
Update requirements.txt
Browse files- requirements.txt +6 -7
requirements.txt
CHANGED
|
@@ -1,12 +1,11 @@
|
|
| 1 |
-
#
|
|
|
|
|
|
|
| 2 |
fastapi==0.100.0
|
| 3 |
-
# 服务启动工具(与 FastAPI 0.100.0 兼容)
|
| 4 |
uvicorn==0.23.2
|
| 5 |
-
# 模型依赖(兼容版本)
|
| 6 |
transformers==4.35.2
|
| 7 |
-
#
|
| 8 |
-
torch==2.0.1
|
| 9 |
-
#
|
| 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
|