ragflow/deepdoc/vision
Mathias Panzenböck 75e1981e13
Remove use of eval() from recognizer.py (#4480)
`eval(op_type)` -> `getattr(operators, op_type)`

### What problem does this PR solve?

Using `eval()` can lead to code injections and is entirely unnecessary
here.

### Type of change

- [x] Other (please describe):

Best practice code improvement, preventing the possibility of code
injection.
2025-01-20 09:52:47 +08:00
..
__init__.py Upgrades Document Layout Analysis model. (#4054) 2024-12-17 11:27:19 +08:00
layout_recognizer.py Accelerate titles' embeddings. (#4492) 2025-01-15 15:20:29 +08:00
ocr.py Remove use of eval() from ocr.py (#4481) 2025-01-20 09:52:30 +08:00
ocr.res Format file format from Windows/dos to Unix (#1949) 2024-08-15 09:17:36 +08:00
operators.py Upgrades Document Layout Analysis model. (#4054) 2024-12-17 11:27:19 +08:00
postprocess.py Fix errors detected by Ruff (#3918) 2024-12-08 14:21:12 +08:00
recognizer.py Remove use of eval() from recognizer.py (#4480) 2025-01-20 09:52:47 +08:00
seeit.py Use consistent log file names, introduced initLogger (#3403) 2024-11-14 17:13:48 +08:00
t_ocr.py Always open text file for write with UTF-8 (#3688) 2024-11-27 16:24:16 +08:00
t_recognizer.py fix:t_recognizer TypeError: 'super' object is not callable (#4404) 2025-01-08 10:59:35 +08:00
table_structure_recognizer.py Edit chunk shall update instead of insert it (#3709) 2024-11-28 13:00:38 +08:00