import numpy as np
from paddleocr import TextRecognition
import cv2

def initialize_ocr_model():
    model = TextRecognition(model_name="PP-OCRv5_server_rec")
    print("OCR模型初始化完成（占位）")
    return model

def ocr_predict(image_array):
    # 保持原有模型调用方式
    output = initialize_ocr_model().predict(input=image_array)
    # 结构化输出结果
    results = output[0]["rec_text"]
    placeholder_result = results.split(',')
    return placeholder_result

