fix: image alpha error

This commit is contained in:
2026-01-01 23:38:52 +08:00
parent 35928c2484
commit 3870c108b2
5 changed files with 71 additions and 30 deletions

View File

@@ -35,12 +35,10 @@ async def process_image_ocr(
)
try:
# 3. Perform OCR based on layout
ocr_result = ocr_service.recognize(image)
except RuntimeError as e:
raise HTTPException(status_code=503, detail=str(e))
# 4. Return response
return ImageOCRResponse(
latex=ocr_result.get("latex", ""),
markdown=ocr_result.get("markdown", ""),