Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -84,7 +84,7 @@ def get_conversational_chain():
|
|
| 84 |
input_variables=["summaries", "question"],
|
| 85 |
)
|
| 86 |
|
| 87 |
-
model = ChatGoogleGenerativeAI(model="gemini-
|
| 88 |
|
| 89 |
# LLMChain ها
|
| 90 |
map_llm_chain = LLMChain(llm=model, prompt=map_prompt_tmpl) # expects: context, question
|
|
@@ -129,7 +129,7 @@ def user_input(user_question):
|
|
| 129 |
new_db = FAISS.load_local("faiss_index", embeddings, allow_dangerous_deserialization=True)
|
| 130 |
|
| 131 |
# برای متنهای بلند recall را افزایش بده
|
| 132 |
-
docs = new_db.similarity_search(user_question, k=
|
| 133 |
|
| 134 |
# اجرای زنجیره
|
| 135 |
chain = get_conversational_chain()
|
|
|
|
| 84 |
input_variables=["summaries", "question"],
|
| 85 |
)
|
| 86 |
|
| 87 |
+
model = ChatGoogleGenerativeAI(model="gemini-2.5-pro", client=genai, temperature=0.3)
|
| 88 |
|
| 89 |
# LLMChain ها
|
| 90 |
map_llm_chain = LLMChain(llm=model, prompt=map_prompt_tmpl) # expects: context, question
|
|
|
|
| 129 |
new_db = FAISS.load_local("faiss_index", embeddings, allow_dangerous_deserialization=True)
|
| 130 |
|
| 131 |
# برای متنهای بلند recall را افزایش بده
|
| 132 |
+
docs = new_db.similarity_search(user_question, k=12)
|
| 133 |
|
| 134 |
# اجرای زنجیره
|
| 135 |
chain = get_conversational_chain()
|