atharv17 commited on
Commit
1a380d8
1 Parent(s): 37730d2

Update chatpdf1.py

Browse files
Files changed (1) hide show
  1. chatpdf1.py +2 -3
chatpdf1.py CHANGED
@@ -48,7 +48,6 @@ def get_conversational_chain():
48
  provided context just say, "answer is not available in the context", don't provide the wrong answer\n\n
49
  Context:\n {context}?\n
50
  Question: \n{question}\n
51
-
52
  Answer:
53
  """
54
 
@@ -65,7 +64,7 @@ def get_conversational_chain():
65
  def user_input(user_question):
66
  embeddings = GoogleGenerativeAIEmbeddings(model = "models/embedding-001")
67
 
68
- new_db = FAISS.load_local("faiss_index", embeddings)
69
  docs = new_db.similarity_search(user_question)
70
 
71
  chain = get_conversational_chain()
@@ -83,7 +82,7 @@ def user_input(user_question):
83
 
84
  def main():
85
  st.set_page_config("Chat PDF")
86
- st.header("Chat with PDF using Gemini💁")
87
 
88
  user_question = st.text_input("Ask a Question from the PDF Files")
89
 
 
48
  provided context just say, "answer is not available in the context", don't provide the wrong answer\n\n
49
  Context:\n {context}?\n
50
  Question: \n{question}\n
 
51
  Answer:
52
  """
53
 
 
64
  def user_input(user_question):
65
  embeddings = GoogleGenerativeAIEmbeddings(model = "models/embedding-001")
66
 
67
+ new_db = FAISS.load_local("faiss_index", embeddings, allow_dangerous_deserialization=True)
68
  docs = new_db.similarity_search(user_question)
69
 
70
  chain = get_conversational_chain()
 
82
 
83
  def main():
84
  st.set_page_config("Chat PDF")
85
+ st.header("Chat with BhaguuuPDF 🤦‍♀️")
86
 
87
  user_question = st.text_input("Ask a Question from the PDF Files")
88