refactor(app): 替换本地 CLIP 模型为远程 Qwen3-VL-Embedding API

- 移除 CLIPEmbedder 本地模型类,改用远程图片 Embedding API 获取特征向量
  - 新增 get_image_embedding() 函数,支持重试机制
  - 移除本地图片上传功能,仅保留 URL 输入和示例图片选择
  - build_index() 增加进度条显示,索引失败时展示具体错误信息
  - 移除 torch、transformers、requests 依赖,新增 httpx
  - 更新界面文案,反映新的技术方案
This commit is contained in:
zhenghu
2026-04-15 09:55:32 +08:00
parent 722d7dc57d
commit fdfc3e2e2b
2 changed files with 142 additions and 145 deletions

View File

@@ -5,14 +5,12 @@ description = "病虫害以图搜图 — 基于图片 Embedding 的相似度搜
readme = "README.md"
requires-python = ">=3.14"
dependencies = [
"httpx>=0.28.1",
"numpy>=2.3.5",
"pillow>=11.2.1",
"plotly>=6.5.0",
"requests>=2.32.3",
"ruff>=0.14.8",
"streamlit==1.52.1",
"torch>=2.7.0",
"transformers>=4.51.3",
]
[[tool.uv.index]]