Spaces:
Sleeping
Sleeping
Update requirements.txt
Browse files- requirements.txt +9 -6
requirements.txt
CHANGED
|
@@ -1,11 +1,14 @@
|
|
| 1 |
-
#
|
| 2 |
--extra-index-url https://download.pytorch.org/whl/cpu
|
| 3 |
-
#
|
| 4 |
-
fastapi==0.
|
|
|
|
| 5 |
uvicorn==0.23.2
|
|
|
|
| 6 |
transformers==4.35.2
|
| 7 |
-
#
|
| 8 |
torch==2.0.1
|
| 9 |
-
#
|
| 10 |
numpy==1.26.4
|
| 11 |
-
pydantic
|
|
|
|
|
|
| 1 |
+
# PyTorch CPU 官方索引源(必须保留,用于下载 CPU 版本 PyTorch)
|
| 2 |
--extra-index-url https://download.pytorch.org/whl/cpu
|
| 3 |
+
# 调整 fastapi 版本为 0.101.0(兼容 pydantic 2.0.2,且包含 MarkdownResponse)
|
| 4 |
+
fastapi==0.101.0
|
| 5 |
+
# uvicorn 版本与 fastapi 0.101.0 兼容
|
| 6 |
uvicorn==0.23.2
|
| 7 |
+
# transformers 版本不变(稳定支持 Cross-Encoder 模型)
|
| 8 |
transformers==4.35.2
|
| 9 |
+
# PyTorch CPU 版本不变(已验证可正常下载)
|
| 10 |
torch==2.0.1
|
| 11 |
+
# NumPy 版本不变(与 PyTorch 2.0.1 兼容)
|
| 12 |
numpy==1.26.4
|
| 13 |
+
# 调整 pydantic 版本为 2.0.2(fastapi 0.101.0 支持该版本,无冲突)
|
| 14 |
+
pydantic==2.0.2
|