Spaces:
Sleeping
Sleeping
Update utility/utils.py
Browse files22 unmodified lines23242526272886 unmodified lines11511611711811912012122 unmodified linesos.environ['PADDLEOCR_HOME'] = '/tmp/.paddleocr'# Check if PaddleOCR home directory is writableif not os.path.exists('/tmp/.paddleocr'):os.makedirs('/tmp/.paddleocr', exist_ok=True)86 unmodified linesfinaltext += ' ' + textreturn finaltextdef extract_text_from_images(image_paths, RESULT_FOLDER):all_extracted_texts = {}all_extracted_imgs = {}for image_path in image_paths:22 unmodified lines23242526272829303132333486 unmodified lines12112212312412512612722 unmodified linesos.environ['PADDLEOCR_HOME'] = '/tmp/.paddleocr'RESULT_FOLDER = 'static/results/'os.makedirs(RESULT_FOLDER, exist_ok=True)if not os.path.exists(app.config['RESULT_FOLDER']):os.makedirs(app.config['RESULT_FOLDER'])# Check if PaddleOCR home directory is writableif not os.path.exists('/tmp/.paddleocr'):os.makedirs('/tmp/.paddleocr', exist_ok=True)86 unmodified linesfinaltext += ' ' + textreturn finaltextdef extract_text_from_images(image_paths):all_extracted_texts = {}all_extracted_imgs = {}for image_path in image_paths:
utility/utils.py+7-1