chore: update yaml generate config

This commit is contained in:
arkohut 2024-09-10 11:54:56 +08:00
parent 23612d1fd5
commit 7f78eb1a4a

View File

@ -186,7 +186,7 @@ def init_plugin(config):
# Save the updated config to a temporary file with strings wrapped in double quotes # Save the updated config to a temporary file with strings wrapped in double quotes
temp_config_path = os.path.join(os.path.dirname(__file__), "temp_ppocr.yaml") temp_config_path = os.path.join(os.path.dirname(__file__), "temp_ppocr.yaml")
with open(temp_config_path, 'w') as f: with open(temp_config_path, 'w') as f:
yaml.safe_dump(ocr_config, f, default_style='"') yaml.safe_dump(ocr_config, f)
ocr = RapidOCR(config_path=temp_config_path) ocr = RapidOCR(config_path=temp_config_path)
thread_pool = ThreadPoolExecutor(max_workers=concurrency) thread_pool = ThreadPoolExecutor(max_workers=concurrency)