20,741
edits
Line 81: | Line 81: | ||
=== Converting to images === | === Converting to images === | ||
pip3 install pdf2image | |||
<syntaxhighlight lang="python"> | |||
from pdf2image import convert_from_path, convert_from_bytes | |||
import tempfile | |||
with tempfile.TemporaryDirectory() as path: | |||
images_from_path = convert_from_path('/folder/example.pdf', output_folder=path) | |||
# Do something here | |||
</syntaxhighlight> | |||
=== Uploading to the GPU === | === Uploading to the GPU === | ||
=== Classification === | === Classification === |