Darka001 commited on
Commit
516f6ee
·
verified ·
1 Parent(s): ea19792

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -4
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": ret_2 , "question": RunnablePassthrough()}
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 formatted_results
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):