Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -24,8 +24,8 @@ db = FAISS.load_local("faiss_index", HuggingFaceEmbeddings(model_name='sentence-
|
|
24 |
|
25 |
|
26 |
retriever = db.as_retriever(
|
27 |
-
search_type="
|
28 |
-
search_kwargs={'k':
|
29 |
)
|
30 |
|
31 |
|
@@ -62,7 +62,7 @@ prompt = PromptTemplate(
|
|
62 |
llm_chain = LLMChain(llm=mistral_llm, prompt=prompt)
|
63 |
|
64 |
|
65 |
-
retriever.search_kwargs = {'k':
|
66 |
qa = RetrievalQA.from_chain_type(
|
67 |
llm=mistral_llm,
|
68 |
chain_type="stuff",
|
|
|
24 |
|
25 |
|
26 |
retriever = db.as_retriever(
|
27 |
+
search_type="mmr",
|
28 |
+
search_kwargs={'k': 1}
|
29 |
)
|
30 |
|
31 |
|
|
|
62 |
llm_chain = LLMChain(llm=mistral_llm, prompt=prompt)
|
63 |
|
64 |
|
65 |
+
retriever.search_kwargs = {'k':1}
|
66 |
qa = RetrievalQA.from_chain_type(
|
67 |
llm=mistral_llm,
|
68 |
chain_type="stuff",
|