Modified Chroma variables
Browse files10 unmodified lines11121314151617181939 unmodified lines5960616263646510 unmodified linesimport streamlit as st# Load OpenAI API key and define directory to store the datapersist_directory = "../../data/processed"# Load the OpenAI Embeddings, LLM , PromptTemplate and LLMChainembeddings = OpenAIEmbeddings()39 unmodified lines# docs[0].page_content# Create the vector database which will be used to search for similar sentencesvectordb = Chroma.from_documents(documents=docs, embedding=embeddings, persist_directory=persist_directory)# Search for the most similar sentences to the question and concatenate top 3 vectors10 unmodified lines1112131415161739 unmodified lines5758596061626310 unmodified linesimport streamlit as st# Load the OpenAI Embeddings, LLM , PromptTemplate and LLMChainembeddings = OpenAIEmbeddings()39 unmodified lines# docs[0].page_content# Create the vector database which will be used to search for similar sentencesvectordb = Chroma.from_documents(documents=docs, embedding=embeddings, persist_directory="./chroma_db")# Search for the most similar sentences to the question and concatenate top 3 vectors
app.py+1-3