Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -20,7 +20,7 @@ from langchain.chains import RetrievalQA
|
|
20 |
#documents = loader.load()
|
21 |
|
22 |
#texts = text_splitter.split_documents(documents)
|
23 |
-
db = Chroma.from_documents(persist_directory=chroma_db, embedding_function=embeddings)
|
24 |
retriever = db.as_retriever()
|
25 |
global qa
|
26 |
qa = RetrievalQA.from_chain_type(llm=model_id, chain_type="stuff", retriever=retriever, return_source_documents=True)
|
|
|
20 |
#documents = loader.load()
|
21 |
|
22 |
#texts = text_splitter.split_documents(documents)
|
23 |
+
db = Chroma.from_documents(persist_directory='chroma_db', embedding_function=embeddings)
|
24 |
retriever = db.as_retriever()
|
25 |
global qa
|
26 |
qa = RetrievalQA.from_chain_type(llm=model_id, chain_type="stuff", retriever=retriever, return_source_documents=True)
|