Spaces:
Build error
Build error
SHAMIL SHAHBAZ AWAN commited on
Update app.py
Browse files16 unmodified lines1718192021222324252021262728293061 unmodified lines929394959697989910014 unmodified lines11511611711811912012112216 unmodified lines background-position: center center; background-repeat: no-repeat; }} /* Ensure title is black */ h1 {{ color: black !important; /* Force title color to black */ }} /* Set title and footer text color to black */ h1, h2, h3, h4, h5, h6, p {{ /* Set footer text color to white */ h2, h3, h4, h5, h6, p {{ color: black; /* Set text color to black */ }} 61 unmodified lines # If the index file doesn't exist, create a new one index = faiss.IndexFlatL2(embedder.get_sentence_embedding_dimension())
# Variable to hold chunks globallychunks = []
# Function to load text from PDFdef load_pdf_text(file_path): """Extract text from the given PDF file."""14 unmodified lines# Process the document and update vector storedef process_and_store_document(file_path): """Process the PDF document, chunk text, generate embeddings, and store them in FAISS.""" global chunks # Make chunks global to access in the query part st.info("Processing PDF document...") # Extract text from the PDF fileapp.py+13-2