ocr: 用腾讯云 QuestionSplitOCR 替换 TextIn 擦除

- 新增 backend/tencent_ocr.py(TC3 签名 + 结果解析,零依赖)
- create_paper_from_image 改为 腾讯 -> 本机 OCR+正则 -> 演示题库 三级兜底
- 删掉 TextIn 客户端、擦除页路由 /api/papers/{pid}/clean 与相关测试
- 新增 tests/test_tencent_ocr.py(13 例,全打桩);单测 114 例、冒烟 39 项全过
This commit is contained in:
dsh
2026-11-18 20:57:45 +08:00
parent 05347e04f8
commit c1cce198fd
12 changed files with 515 additions and 417 deletions
+1 -1
View File
@@ -63,7 +63,7 @@ try:
st, r = call("GET", "/api/health")
check("health 200", st == 200, r)
check("routes=57", r["data"]["routes"] == 57, r["data"].get("routes"))
check("routes=57", r["data"]["routes"] == 56, r["data"].get("routes"))
st, r = call("POST", "/api/auth/wx-login", {"code": "demo"})
tok = r["data"]["token"]