Browse Source

force single thread

Karl Hudgell 1 week ago
parent
commit
a052aac26d
1 changed files with 2 additions and 0 deletions
  1. 2 0
      app.py

+ 2 - 0
app.py

@@ -14,6 +14,8 @@ from paddleocr import PaddleOCR
 from PIL import Image
 import numpy as np
 
+os.environ["OMP_NUM_THREADS"] = "1"
+os.environ["MKL_NUM_THREADS"] = "1"
 
 app = Flask(__name__)
 app.config.from_object(