feat: 关闭ocr

This commit is contained in:
李如威 2025-12-09 17:58:47 +08:00
parent bbd7c23fff
commit 5ac5b5c7b1
2 changed files with 0 additions and 4 deletions

View File

@ -8,6 +8,4 @@ pymupdf
python-docx
scikit-learn
aiofiles
paddlepaddle
paddleocr
pillow

View File

@ -4,7 +4,6 @@ import fitz # PyMuPDF
import aiofiles
import io
from pathlib import Path
# from paddleocr import PaddleOCR
from PIL import Image
# -----------------------------
@ -14,7 +13,6 @@ from PIL import Image
# 初始化 OCR只初始化一次注意这是 CPU 版本,如果需要 GPU 需要额外配置
print("ocr 加载...")
ocr = {}
# PaddleOCR(use_angle_cls=True, lang="ch", use_gpu=False)
print("ocr 加载结束")
async def _ocr_image_bytes(img_bytes: bytes) -> str: