fix: 兼容模型加载失败场景,手动构造 image-classification pipeline
- 增加模型加载的异常处理,当 pipeline 直接加载失败时回退为
手动加载 AutoImageProcessor 和 AutoModelForImageClassification
- 添加 torchvision 依赖
This commit is contained in:
@@ -10,6 +10,7 @@ dependencies = [
|
||||
"ruff>=0.14.8",
|
||||
"streamlit==1.52.1",
|
||||
"torch>=2.7.0",
|
||||
"torchvision>=0.22.0",
|
||||
"transformers>=4.52.0",
|
||||
"pillow>=11.2.0",
|
||||
]
|
||||
|
||||
Reference in New Issue
Block a user