Files
mayan-edms/mayan/apps/ocr/runtime.py
Roberto Rosario 8bc4b6a95e Move YAML code to its own module
Code now resides in common.serialization in the form
of two new functions: yaml_load and yaml_dump.

Signed-off-by: Roberto Rosario <roberto.rosario@mayan-edms.com>
2019-07-10 19:35:42 -04:00

16 lines
383 B
Python

from __future__ import unicode_literals
from django.utils.module_loading import import_string
from mayan.apps.common.serialization import yaml_load
from .settings import setting_ocr_backend, setting_ocr_backend_arguments
ocr_backend = import_string(
dotted_path=setting_ocr_backend.value
)(
**yaml_load(
stream=setting_ocr_backend_arguments.value or '{}'
)
)