Pavan178 commited on
Commit
dba9ef7
·
verified ·
1 Parent(s): 86e77d8

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -2
app.py CHANGED
@@ -97,7 +97,7 @@ Bot Response: "In the document, 'cognitive dissonance' is defined as [definition
97
  if not self.qa_chain:
98
  return "Please upload a PDF first."
99
  result = self.qa_chain({"question": query})
100
- return result['answer']
101
 
102
  def get_pdf_path(self):
103
 
@@ -145,7 +145,6 @@ def respond(message, history):
145
  history.append((message, response_answer))
146
 
147
  return "", history, response_source1, response_source1_page, response_source2, response_source2_page, response_source3, response_source3_page
148
-
149
  def clear_chatbot():
150
  pdf_chatbot.memory.clear()
151
  return []
 
97
  if not self.qa_chain:
98
  return "Please upload a PDF first."
99
  result = self.qa_chain({"question": query})
100
+ return result # Return the entire result dictionary
101
 
102
  def get_pdf_path(self):
103
 
 
145
  history.append((message, response_answer))
146
 
147
  return "", history, response_source1, response_source1_page, response_source2, response_source2_page, response_source3, response_source3_page
 
148
  def clear_chatbot():
149
  pdf_chatbot.memory.clear()
150
  return []