Compare commits

..

No commits in common. "2275e8b5be9e6b1c53624cbc64258f2f2dd90058" and "f3704a3aa4483a7fece365148b1da262857a920d" have entirely different histories.

10 changed files with 54 additions and 1337 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 115 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 163 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 258 KiB

View File

@ -2,7 +2,6 @@
langchain>=0.0.267
langchain-community>=0.0.10
transformers>=4.30.0
langchain_community
# Document processing
unstructured>=0.10.0
@ -21,7 +20,7 @@ tabula-py>=2.7.0
# Data manipulation
pandas>=2.0.0
numpy
numpy>=1.24.0
# Visualization
matplotlib>=3.7.0
@ -39,4 +38,3 @@ sentence-transformers>=2.2.2
# Utilities
tqdm>=4.65.0
python-dotenv>=1.0.0
pi_heif

File diff suppressed because one or more lines are too long

View File

@ -1,25 +0,0 @@
from unstructured.partition.pdf import partition_pdf
output_path = "/home/sepehr/dev/rag/document/"
file_path = "/home/sepehr/dev/rag/document/04Extrait_Methodologie_Experimentale.pdf"
# Reference: https://docs.unstructured.io/open-source/core-functionality/chunking
chunks = partition_pdf(
filename=file_path,
infer_table_structure=True, # extract tables
strategy="hi_res", # mandatory to infer tables
extract_image_block_types=["Image"], # Add 'Table' to list to extract image of tables
# image_output_dir_path=output_path, # if None, images and tables will saved in base64
extract_image_block_to_payload=True, # if true, will extract base64 for API usage
chunking_strategy="by_title", # or 'basic'
max_characters=10000, # defaults to 500
combine_text_under_n_chars=2000, # defaults to 0
new_after_n_chars=6000,
# extract_images_in_pdf=True, # deprecated
)
print(chunks[3].metadata.orig_elements)

File diff suppressed because one or more lines are too long