Closed yanziwu621 closed 1 day ago
是用的哪个示例代码呢
from paddlex import create_pipeline
pipeline = create_pipeline( pipeline="PP-ChatOCRv3-doc", llm_name="ernie-3.5", llm_params={"api_type": "qianfan", "ak": "test", "sk": "test"}, # 请填入您的ak与sk,否则无法调用大模型
device="gpu:3"
)
visual_result, visual_info = pipeline.visual_predict("resume.pdf")
for res in visual_result: res.save_to_img("./output") res.save_to_html('./output') res.save_to_xlsx('./output')
vector = pipeline.build_vector(visual_info=visual_info)
chat_result = pipeline.chat( key_list=["姓名", "手机号"], visual_info=visual_info, vector=vector, ) chat_result.print()
Paddle的版本是?请确保是PaddlePaddle 3.0beta1
Paddle的版本更新至3.0beta1,运行成功。
File "/......./PaddleX/paddlex/inference/components/paddle_predictor/predictor.py", line 145, in _create predictor = create_predictor(config) RuntimeError: (PreconditionNotMet) Tensor's dimension is out of bound.Tensor's dimension must be equal or less than the size of its memory.But received Tensor's dimension is 8, memory's size is 0. [Hint: Expected numel() SizeOf(dtype()) <= memory_size(), but received numel() SizeOf(dtype()):8 > memory_size():0.] (at /paddle/paddle/phi/core/dense_tensor_impl.cc:55) [operator < cast > error]