Update app.py
Browse files
app.py
CHANGED
@@ -196,7 +196,7 @@ def summarize_act(message, act_number):
|
|
196 |
ret2 =db3.as_retriever( search_kwargs={"k": 50, "filter": {'act_number': {
|
197 |
'$eq': act_number}}})
|
198 |
rag_chain_summarize = RunnableParallel(
|
199 |
-
{"context":
|
200 |
).assign(answer=rag_chain_from_docs)
|
201 |
context = ret2.get_relevant_documents(message)
|
202 |
#return rag_chain_summarize.invoke("")
|
@@ -222,9 +222,9 @@ def generate_answer(message, history, checkbox, subject_input, rubric, date_beg,
|
|
222 |
result = generate_with_filters(message, subject_input, rubric, date_beg, date_end)
|
223 |
|
224 |
|
225 |
-
result['answer'] =result['answer'].split("[/INST]")[-1].strip()
|
226 |
-
formatted_results = format_result(result)
|
227 |
-
return
|
228 |
|
229 |
|
230 |
def change_group(check_value):
|
|
|
196 |
ret2 =db3.as_retriever( search_kwargs={"k": 50, "filter": {'act_number': {
|
197 |
'$eq': act_number}}})
|
198 |
rag_chain_summarize = RunnableParallel(
|
199 |
+
{"context": ret2 , "question": RunnablePassthrough()}
|
200 |
).assign(answer=rag_chain_from_docs)
|
201 |
context = ret2.get_relevant_documents(message)
|
202 |
#return rag_chain_summarize.invoke("")
|
|
|
222 |
result = generate_with_filters(message, subject_input, rubric, date_beg, date_end)
|
223 |
|
224 |
|
225 |
+
#result['answer'] =result['answer'].split("[/INST]")[-1].strip()
|
226 |
+
#formatted_results = format_result(result)
|
227 |
+
return result
|
228 |
|
229 |
|
230 |
def change_group(check_value):
|