Pdf Ingestion pipeline completed

This commit is contained in:
timothyafolami
2024-08-05 22:14:19 +01:00
parent b0c3eb8032
commit c34de21971
15 changed files with 318 additions and 90 deletions
+25
View File
@@ -0,0 +1,25 @@
from data_ingestion.utils import search, load_embedded_data
import sys, os
# Add the root directory to sys.path
sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), '..')))
from loggings.logging_config import logger
# loading the embedded data
embed_db = load_embedded_data()
if __name__ == "__main__":
logger.info("Receiving the search query")
query = input("Enter the search query: ")
logger.info(f"Searching for {query}")
page_content, all, pages = search(embed_db, query)
logger.info("Search completed")
logger.info(f"Page content: {page_content}")
print(f"Page content: {page_content}")
print(f"Pages: {pages}")
print(f"All: {all}")
print("Search completed")