Skip to content

Commit

Permalink
Added an OCR sempahore.
Browse files Browse the repository at this point in the history
  • Loading branch information
umarbutler committed Jun 1, 2024
1 parent 937b24c commit a8f2bac
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/oalc_creator/scrapers/queensland_legislation.py
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ async def _get_doc(self, entry: Entry) -> Document | None:
resp = (await self.get(Request(url))).stream

# Extract the text of the document from the PDF with OCR.
text = await pdf2txt(resp, self.ocr_batch_size, self.thread_pool_executor)
text = await pdf2txt(resp, self.ocr_batch_size, self.thread_pool_executor, self.ocr_semaphore)

# Store the mime of the document.
mime = 'application/pdf'
Expand Down

0 comments on commit a8f2bac

Please sign in to comment.