Fix: image not displaying thumbnails when using pipeline (#12574)

### What problem does this PR solve?

Fix image not displaying thumbnails when using pipeline.

### Type of change

- [x] Bug Fix (non-breaking change which fixes an issue)
This commit is contained in:
Yongteng Lei
2026-01-13 12:54:13 +08:00
committed by GitHub
parent 64c75d558e
commit 68e5c86e9c
2 changed files with 13 additions and 3 deletions

View File

@ -61,7 +61,7 @@ class ParserParam(ProcessParamBase):
"json",
],
"image": [
"text",
"json",
],
"email": [
"text",
@ -120,7 +120,7 @@ class ParserParam(ProcessParamBase):
"lang": "Chinese",
"system_prompt": "",
"suffix": ["jpg", "jpeg", "png", "gif"],
"output_format": "text",
"output_format": "json",
},
"email": {
"suffix": [
@ -642,7 +642,12 @@ class Parser(ProcessBase):
else:
txt = cv_model.describe(img_binary.read())
self.set_output("text", txt)
json_result = [{
"text": txt,
"image": img,
"doc_type_kwd": "image",
}]
self.set_output("json", json_result)
def _audio(self, name, blob):
import os