JUNGU commited on
Commit
729d217
·
verified ·
1 Parent(s): 30f0fa7

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -47,7 +47,7 @@ def load_pdf_data():
47
  }
48
  return pdf_data
49
 
50
- # Update embeddings at startup
51
  update_embeddings()
52
 
53
  # Load vector store and PDF data
@@ -78,7 +78,7 @@ def pdf_viewer_interface(pdf_state, page_number, action=None, page_input=None):
78
  def chat_interface(user_input, chat_history, pdf_state):
79
  chat_history_list = [item for sublist in chat_history for item in sublist]
80
 
81
- response = get_answer(user_input, chat_history_list)
82
  full_response = response["answer"]
83
  sources = response["sources"]
84
 
 
47
  }
48
  return pdf_data
49
 
50
+ # Update embeddings with new documents
51
  update_embeddings()
52
 
53
  # Load vector store and PDF data
 
78
  def chat_interface(user_input, chat_history, pdf_state):
79
  chat_history_list = [item for sublist in chat_history for item in sublist]
80
 
81
+ response = get_answer(qa_chain, user_input, chat_history_list)
82
  full_response = response["answer"]
83
  sources = response["sources"]
84