spacy nlp ner

This commit is contained in:
m
2026-07-12 22:11:57 +02:00
parent 6ed51daa6b
commit 010cb2cb49
22 changed files with 480 additions and 8 deletions
+16 -1
View File
@@ -7,8 +7,23 @@ import (
type HealthHandler struct {
ocr interface{ HealthCheck() error }
nlp interface{ HealthCheck() error }
}
func (h *HealthHandler) Check(c *gin.Context) {
api.Success(c, gin.H{"status": "healthy"})
status := gin.H{"status": "healthy"}
if err := h.ocr.HealthCheck(); err != nil {
status["ocr"] = err.Error()
} else {
status["ocr"] = "healthy"
}
if err := h.nlp.HealthCheck(); err != nil {
status["nlp"] = err.Error()
} else {
status["nlp"] = "healthy"
}
api.Success(c, status)
}