RAGFlow is an agent-native database: a Retrieval-Augmented Generation (RAG) engine that grew into context infrastructure.
Go agent-harnessagent-native-databaseagentic-aiagentic-retrievalagentic-searchaiai-agentscontext-enginecontext-engineeringcontext-managementharness-engineeringknowledge-compilationragretrieval-augmented-generationretrieval-harnesssearch-harness
Remove use of eval() from recognizer.py (#4480)
Mathias Panzenböck75e1981e130c
diff --git a/deepdoc/vision/recognizer.py b/deepdoc/vision/recognizer.pyindex ec6ac9308f..0695005c76 100644--- a/deepdoc/vision/recognizer.py+++ b/deepdoc/vision/recognizer.py@@ -25,6 +25,7 @@ from huggingface_hub import snapshot_downloadfrom api.utils.file_utils import get_project_base_directoryfrom .operators import * # noqa: F403from .operators import preprocess+from . import operatorsclass Recognizer(object):@@ -319,7 +320,7 @@ class Recognizer(object):]:new_op_info = op_info.copy()op_type = new_op_info.pop('type')- preprocess_ops.append(eval(op_type)(**new_op_info))+ preprocess_ops.append(getattr(operators, op_type)(**new_op_info))for im_path in image_list:im, im_info = preprocess(im_path, preprocess_ops)