File tree Expand file tree Collapse file tree 3 files changed +4
-5
lines changed Expand file tree Collapse file tree 3 files changed +4
-5
lines changed Original file line number Diff line number Diff line change 99TMP_FILE_DIR = os .path .join (ROOT_DIR , "tmp" )
1010
1111# Should we actually ocr or just extract text from PDFs ? NOTE: OCR IS STILL APPLIED TO IMAGES if detected | possible vals : "OCR", "NO_OCR"
12- OPERATION_MODE = os .environ .get ("OCR_SERVICE_OPERATION_MODE" , "NO_OCR " )
12+ OPERATION_MODE = os .environ .get ("OCR_SERVICE_OPERATION_MODE" , "OCR " )
1313
1414# basic app settings
1515OCR_SERVICE_PORT = os .environ .get ("OCR_SERVICE_PORT" , 8090 )
Original file line number Diff line number Diff line change @@ -22,10 +22,10 @@ services:
2222 - OMP_THREAD_LIMIT=1
2323
2424 # ocr service variables
25- - OCR_SERVICE_THREADS=1
2625 - OCR_SERVICE_LOG_LEVEL=20
27- - OCR_SERVICE_CPU_THREADS=1
28- - OCR_SERVICE_CONVERTER_THREADS=1
26+ - OCR_SERVICE_CPU_THREADS=4
27+ - OCR_SERVICE_CONVERTER_THREADS=4
28+ - OCR_SERVICE_OPERATION_MODE=OCR
2929 ulimits :
3030 memlock :
3131 soft : -1
Original file line number Diff line number Diff line change 77import time
88import traceback
99import uuid
10- import pikepdf
1110
1211from subprocess import PIPE , Popen
1312from io import BytesIO
You can’t perform that action at this time.
0 commit comments