Spaces:
Build error
Build error
Update app.py
Browse files
app.py
CHANGED
|
@@ -22,6 +22,11 @@ llm = OpenAI()
|
|
| 22 |
## Setup the Q&A chain that stiches LLM, similar results from the vectordb & the prompt template
|
| 23 |
llm_chain = LLMChain(prompt=QA_CHAIN_PROMPT, llm=llm)
|
| 24 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 25 |
def blogbot(question):
|
| 26 |
## query similar results
|
| 27 |
# question = "are contents biased?"
|
|
|
|
| 22 |
## Setup the Q&A chain that stiches LLM, similar results from the vectordb & the prompt template
|
| 23 |
llm_chain = LLMChain(prompt=QA_CHAIN_PROMPT, llm=llm)
|
| 24 |
|
| 25 |
+
|
| 26 |
+
## load vector db
|
| 27 |
+
embeddings = OpenAIEmbeddings()
|
| 28 |
+
db = FAISS.load_local("faiss_index", embeddings)
|
| 29 |
+
|
| 30 |
def blogbot(question):
|
| 31 |
## query similar results
|
| 32 |
# question = "are contents biased?"
|