ocr: allow 75% indians poor
All checks were successful
build-and-deploy / build-deploy (push) Successful in 32s

This commit is contained in:
androidlover5842
2026-01-31 10:03:50 +05:30
parent 9f28580cc9
commit 12d1327525
2 changed files with 12 additions and 5 deletions

View File

@@ -2,6 +2,7 @@ package com.android.trisolarisserver.config
import jakarta.servlet.http.HttpServletRequest
import org.springframework.http.HttpStatus
import org.springframework.http.MediaType
import org.springframework.http.ResponseEntity
import org.springframework.security.access.AccessDeniedException
import org.springframework.web.bind.annotation.ExceptionHandler
@@ -18,7 +19,9 @@ class ApiExceptionHandler {
request: HttpServletRequest
): ResponseEntity<ApiError> {
val status = ex.statusCode as HttpStatus
return ResponseEntity.status(status).body(
return ResponseEntity.status(status)
.contentType(MediaType.APPLICATION_JSON)
.body(
ApiError(
timestamp = OffsetDateTime.now().toString(),
status = status.value(),
@@ -34,7 +37,9 @@ class ApiExceptionHandler {
ex: AccessDeniedException,
request: HttpServletRequest
): ResponseEntity<ApiError> {
return ResponseEntity.status(HttpStatus.FORBIDDEN).body(
return ResponseEntity.status(HttpStatus.FORBIDDEN)
.contentType(MediaType.APPLICATION_JSON)
.body(
ApiError(
timestamp = OffsetDateTime.now().toString(),
status = HttpStatus.FORBIDDEN.value(),
@@ -50,7 +55,9 @@ class ApiExceptionHandler {
ex: Exception,
request: HttpServletRequest
): ResponseEntity<ApiError> {
return ResponseEntity.status(HttpStatus.INTERNAL_SERVER_ERROR).body(
return ResponseEntity.status(HttpStatus.INTERNAL_SERVER_ERROR)
.contentType(MediaType.APPLICATION_JSON)
.body(
ApiError(
timestamp = OffsetDateTime.now().toString(),
status = HttpStatus.INTERNAL_SERVER_ERROR.value(),

View File

@@ -30,6 +30,6 @@ ai.llama.repeatPenalty=1.0
ai.llama.topK=40
ocr.paddle.enabled=true
ocr.paddle.baseUrl=https://ocr.hoteltrisolaris.in/
ocr.paddle.minScore=0.75
ocr.paddle.minAverageScore=0.8
ocr.paddle.minScore=0.9
ocr.paddle.minAverageScore=0.75
ocr.paddle.minTextLength=4