Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -40,7 +40,7 @@ def load_pdf_and_generate_embeddings(pdf_doc, open_ai_key, relevant_pages):
|
|
| 40 |
|
| 41 |
|
| 42 |
#To create a vector store, we use the Chroma class, which takes the documents (pages in our case) and the embeddings instance
|
| 43 |
-
vectordb = Chroma.from_documents(pages_to_be_loaded, embedding=embeddings)
|
| 44 |
print("Vectordb has been created")
|
| 45 |
|
| 46 |
#Finally, we create the bot using the RetrievalQA class
|
|
|
|
| 40 |
|
| 41 |
|
| 42 |
#To create a vector store, we use the Chroma class, which takes the documents (pages in our case) and the embeddings instance
|
| 43 |
+
vectordb = Chroma.from_documents(documents=pages_to_be_loaded, embedding=embeddings, persist_directory='db')
|
| 44 |
print("Vectordb has been created")
|
| 45 |
|
| 46 |
#Finally, we create the bot using the RetrievalQA class
|