Medical_RAG / images.py
Surbhi123's picture
Upload folder using huggingface_hub
64772a4 verified
raw
history blame contribute delete
421 Bytes
from unstructured.partition.pdf import partition_pdf
output_path = "./images"
raw_pdf_elements = partition_pdf(
filename="./Data/AC-Aids-for-Dogs_Canine-Periodontal-Disease.pdf",
extract_images_in_pdf=True,
infer_table_structure=True,
chunking_strategy="by_title",
max_characters=4000,
new_after_n_chars=3800,
combine_text_under_n_chars=2000,
extract_image_block_output_dir=output_path,
)