mirror of
https://github.com/infiniflow/ragflow.git
synced 2026-02-02 08:35:08 +08:00
feat: add paddleocr parser (#12513)
### What problem does this PR solve? Add PaddleOCR as a new PDF parser. ### Type of change - [x] New Feature (non-breaking change which adds functionality)
This commit is contained in:
@ -15,6 +15,7 @@ import {
|
||||
useSubmitHunyuan,
|
||||
useSubmitMinerU,
|
||||
useSubmitOllama,
|
||||
useSubmitPaddleOCR,
|
||||
useSubmitSpark,
|
||||
useSubmitSystemModelSetting,
|
||||
useSubmitTencentCloud,
|
||||
@ -28,6 +29,7 @@ import FishAudioModal from './modal/fish-audio-modal';
|
||||
import GoogleModal from './modal/google-modal';
|
||||
import HunyuanModal from './modal/hunyuan-modal';
|
||||
import MinerUModal from './modal/mineru-modal';
|
||||
import PaddleOCRModal from './modal/paddleocr-modal';
|
||||
import TencentCloudModal from './modal/next-tencent-modal';
|
||||
import OllamaModal from './modal/ollama-modal';
|
||||
import SparkModal from './modal/spark-modal';
|
||||
@ -138,6 +140,14 @@ const ModelProviders = () => {
|
||||
mineruLoading,
|
||||
} = useSubmitMinerU();
|
||||
|
||||
const {
|
||||
paddleocrVisible,
|
||||
hidePaddleOCRModal,
|
||||
showPaddleOCRModal,
|
||||
onPaddleOCROk,
|
||||
paddleocrLoading,
|
||||
} = useSubmitPaddleOCR();
|
||||
|
||||
const ModalMap = useMemo(
|
||||
() => ({
|
||||
[LLMFactory.Bedrock]: showBedrockAddingModal,
|
||||
@ -150,6 +160,7 @@ const ModelProviders = () => {
|
||||
[LLMFactory.GoogleCloud]: showGoogleAddingModal,
|
||||
[LLMFactory.AzureOpenAI]: showAzureAddingModal,
|
||||
[LLMFactory.MinerU]: showMineruModal,
|
||||
[LLMFactory.PaddleOCR]: showPaddleOCRModal,
|
||||
}),
|
||||
[
|
||||
showBedrockAddingModal,
|
||||
@ -162,6 +173,7 @@ const ModelProviders = () => {
|
||||
showGoogleAddingModal,
|
||||
showAzureAddingModal,
|
||||
showMineruModal,
|
||||
showPaddleOCRModal,
|
||||
],
|
||||
);
|
||||
|
||||
@ -309,6 +321,12 @@ const ModelProviders = () => {
|
||||
onOk={onMineruOk}
|
||||
loading={mineruLoading}
|
||||
></MinerUModal>
|
||||
<PaddleOCRModal
|
||||
visible={paddleocrVisible}
|
||||
hideModal={hidePaddleOCRModal}
|
||||
onOk={onPaddleOCROk}
|
||||
loading={paddleocrLoading}
|
||||
></PaddleOCRModal>
|
||||
</div>
|
||||
);
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user