fix: 从 Gitea 仓库下载模型(无需认证)
Build and Deploy / build (push) Has been cancelled
Build and Deploy / deploy (push) Has been cancelled

This commit is contained in:
2026-07-16 19:52:57 +00:00
parent a3750ffce4
commit e9d3bdbc68
+7 -6
View File
@@ -17,14 +17,15 @@ type Handler struct {
// 模型配置
var modelConfigs = map[string]string{
"math.onnx": "[AntiCAP]-CRNN_Math.onnx",
"ocr.onnx": "[Dddd]-OCR.onnx",
"rotate.onnx": "[AntiCAP]-Rotation-RotNetR.onnx",
"siamese.onnx": "[AntiCAP]-Siamese-ResNet18.onnx",
"charsets.txt": "[Dddd]-CharSets.txt",
"math.onnx": "math.onnx",
"ocr.onnx": "ocr.onnx",
"rotate.onnx": "rotate.onnx",
"siamese.onnx": "siamese.onnx",
"charsets.txt": "charsets.txt",
}
const modelBaseURL = "https://raw.githubusercontent.com/81NewArk/AntiCAP/main/AntiCAP/AntiCAP-Models"
// 从 Gitea 仓库下载(无需认证,公开仓库)
const modelBaseURL = "https://git.viaeon.com/admin/anticaptcha/raw/branch/main/models"
func NewHandler(modelPath string) *Handler {
h := &Handler{