Spaces:
Build error
Build error
SHAMIL SHAHBAZ AWAN commited on
Update app.py
Browse files5 unmodified lines67891011124 unmodified lines171819202122232424 unmodified lines49505152535455565758596061625 unmodified linesimport numpy as npfrom groq import Client# Set background imagebackground_image_url = "https://jamesclear.com/wp-content/uploads/2020/11/atomic-habits_gallery_hi-res_01.jpg"st.markdown(f"""4 unmodified linesbackground-position: center center;background-repeat: no-repeat;}}h1 {{color: black;}}.footer {{position: fixed;24 unmodified lines# Define file path and vector store folderfile_path = "Atomic habits ( PDFDrive ).pdf" # File directly in the root directory of the appVECTORSTORE_FOLDER = "vectorstore/index.faiss" # Folder in the root directory# Ensure the vector store folder existsif not os.path.exists(VECTORSTORE_FOLDER):os.makedirs(VECTORSTORE_FOLDER)# Define the vector store pathvectorstore_path = os.path.join(VECTORSTORE_FOLDER, "index.faiss")# Load or create FAISS indexif os.path.exists(vectorstore_path):5 unmodified lines67891011124 unmodified lines171819202122232424 unmodified lines49505152535455565758596061625 unmodified linesimport numpy as npfrom groq import Client# Set background image and text colorbackground_image_url = "https://jamesclear.com/wp-content/uploads/2020/11/atomic-habits_gallery_hi-res_01.jpg"st.markdown(f"""4 unmodified linesbackground-position: center center;background-repeat: no-repeat;}}h1, h2, h3, h4, h5, h6, p {{color: black; /* Set text color to black */}}.footer {{position: fixed;24 unmodified lines# Define file path and vector store folderfile_path = "Atomic habits ( PDFDrive ).pdf" # File directly in the root directory of the appVECTORSTORE_FOLDER = "vectorstore" # Folder where the FAISS index will be stored# Ensure the vector store folder existsif not os.path.exists(VECTORSTORE_FOLDER):os.makedirs(VECTORSTORE_FOLDER)# Define the vector store pathvectorstore_path = os.path.join(VECTORSTORE_FOLDER, "index.faiss") # Correct path to the index file# Load or create FAISS indexif os.path.exists(vectorstore_path):
app.py+5-5