Check if the input parameters are valid based on the initialized models. Args: input_params (Dict): A dictionary containing input parameters. Returns: bool: True if all required models are initialized according to input parameters, False otherwise.
(self, input_params: dict)
| 259 | ) |
| 260 | |
| 261 | def check_model_settings_valid(self, input_params: dict) -> bool: |
| 262 | """ |
| 263 | Check if the input parameters are valid based on the initialized models. |
| 264 | |
| 265 | Args: |
| 266 | input_params (Dict): A dictionary containing input parameters. |
| 267 | |
| 268 | Returns: |
| 269 | bool: True if all required models are initialized according to input parameters, False otherwise. |
| 270 | """ |
| 271 | |
| 272 | if input_params[ |
| 273 | 'use_doc_preprocessor'] and not self.use_doc_preprocessor: |
| 274 | logging.error( |
| 275 | 'Set use_doc_preprocessor, but the models for doc preprocessor are not initialized.', |
| 276 | ) |
| 277 | return False |
| 278 | |
| 279 | return True |
| 280 | |
| 281 | def get_layout_parsing_results( |
| 282 | self, |