Rauhan commited on
Commit
bc1c968
·
1 Parent(s): 4a38803

UPDATE: ThreadPoolExecutor

Browse files
Files changed (1) hide show
  1. functions.py +1 -1
functions.py CHANGED
@@ -298,7 +298,7 @@ def getTextFromImagePDF(pdfBytes):
298
  global reader
299
  return "\n".join([text[1] for text in reader.readtext(np.array(image), paragraph=True)])
300
  allImages = convert_from_bytes(pdfBytes)
301
- with ThreadPoolExecutor(max_workers = 32) as p:
302
  texts = list(p.map(getText, allImages))
303
  return "\n\n\n".join(texts)
304
 
 
298
  global reader
299
  return "\n".join([text[1] for text in reader.readtext(np.array(image), paragraph=True)])
300
  allImages = convert_from_bytes(pdfBytes)
301
+ with ThreadPoolExecutor() as p:
302
  texts = list(p.map(getText, allImages))
303
  return "\n\n\n".join(texts)
304