matriv-rag-demo / rag_demo /pipeline.py
AdrienB134's picture
Upload 54 files
7fdb8e9 verified
raw
history blame contribute delete
320 Bytes
from rag_demo.preprocessing import (
convert_pdf_to_text,
load_to_vector_db,
chunk_and_embed,
)
from loguru import logger
def process_pdf(file_path: str):
convert = convert_pdf_to_text([file_path])
embedded_chunks = chunk_and_embed([convert])
load_to_vector_db(embedded_chunks)
return True