nhathuy07 commited on
Commit
2188b8e
·
verified ·
1 Parent(s): fb4bebf

Update main.py

Browse files
Files changed (1) hide show
  1. main.py +2 -2
main.py CHANGED
@@ -533,8 +533,8 @@ async def scan2OCR(request):
533
  # out = pytesseract.image_to_string(f"{file_id}.png", lang="vie", config=r'--psm 4')
534
  # os.remove(f"{file_id}.png")
535
  _loop = asyncio.get_running_loop()
536
- out = await _loop.run_in_executor(None, partial(__ocr, im, file_id))
537
-
538
  # adapt the output text to the HTML-based rich text editor
539
  ret.append({"content": out.replace('\n','<br/>')})
540
 
 
533
  # out = pytesseract.image_to_string(f"{file_id}.png", lang="vie", config=r'--psm 4')
534
  # os.remove(f"{file_id}.png")
535
  _loop = asyncio.get_running_loop()
536
+ _out = await _loop.run_in_executor(None, partial(__ocr, im, file_id))
537
+ out = await _out
538
  # adapt the output text to the HTML-based rich text editor
539
  ret.append({"content": out.replace('\n','<br/>')})
540