Skip to content

Commit

Permalink
use pdf_path instead of pdf
Browse files Browse the repository at this point in the history
  • Loading branch information
koaning committed Oct 9, 2023
1 parent dad0cc4 commit 47aa458
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion prodigy_pdf/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
import pypdfium2 as pdfium

from prodigy import recipe, set_hashes, ControllerComponentsDict
from prodigy.components.stream import Stream
from prodigy.components.stream import Stream, get_stream
from prodigy.util import msg

def page_to_image(page: pdfium.PdfPage) -> str:
Expand All @@ -30,6 +30,7 @@ def generate_pdf_pages(pdf_paths: List[Path]):
"meta": {
"page": page_number,
"pdf": pdf_path.parts[-1],
"path": str(pdf_path)
}
})
pdf.close()
Expand Down

0 comments on commit 47aa458

Please sign in to comment.