From 6a71314d70819e760d056e0cfb41695fedc303ab Mon Sep 17 00:00:00 2001 From: balibabu Date: Fri, 28 Feb 2025 18:44:04 +0800 Subject: [PATCH] Feat: Add the Experimental text to the option of the large model of the Image2text type of LayoutRecognizeItem (#5495) ### What problem does this PR solve? Feat: Add the Experimental text to the option of the large model of the Image2text type of LayoutRecognizeItem ### Type of change - [x] New Feature (non-breaking change which adds functionality) --- web/src/components/layout-recognize.tsx | 21 +++++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-) diff --git a/web/src/components/layout-recognize.tsx b/web/src/components/layout-recognize.tsx index 3279ac980..b5642c37f 100644 --- a/web/src/components/layout-recognize.tsx +++ b/web/src/components/layout-recognize.tsx @@ -20,7 +20,24 @@ const LayoutRecognize = () => { value: x, })); - return [...list, ...allOptions[LlmModelType.Image2text]]; + const image2TextList = allOptions[LlmModelType.Image2text].map((x) => { + return { + ...x, + options: x.options.map((y) => { + return { + ...y, + label: ( +
+ {y.label} + Experimental +
+ ), + }; + }), + }; + }); + + return [...list, ...image2TextList]; }, [allOptions, t]); return ( @@ -30,7 +47,7 @@ const LayoutRecognize = () => { initialValue={DocumentType.DeepDOC} tooltip={t('layoutRecognizeTip')} > - ); };