Phase 7: Hoàn thiện Modular RAG Backend với FastAPI và Đa LLM Provider
This commit is contained in:
14
scratch/test_paddle.py
Normal file
14
scratch/test_paddle.py
Normal file
@@ -0,0 +1,14 @@
|
||||
import cv2
|
||||
import numpy as np
|
||||
from paddleocr import PaddleOCR
|
||||
|
||||
# Create a dummy image with some text
|
||||
img = np.zeros((100, 300, 3), dtype=np.uint8)
|
||||
cv2.putText(img, "Hello World", (10, 50), cv2.FONT_HERSHEY_SIMPLEX, 1, (255, 255, 255), 2)
|
||||
|
||||
ocr = PaddleOCR(use_angle_cls=False, lang="vi", enable_mkldnn=False)
|
||||
result = ocr.ocr(img)
|
||||
|
||||
print("===== RAW RESULT =====")
|
||||
print(result)
|
||||
print("======================")
|
||||
Reference in New Issue
Block a user