shubhendu-ghosh commited on
Commit
7fe73eb
1 Parent(s): 1161ef7

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -4
app.py CHANGED
@@ -88,16 +88,16 @@ def get_conversational_chain():
88
 
89
  def user_input(user_question):
90
  embeddings = GoogleGenerativeAIEmbeddings(model = "models/embedding-001")
91
- '''try:
92
  new_db = FAISS.load_local("faiss_index", embeddings, allow_dangerous_deserialization=True)
93
  docs = new_db.similarity_search(user_question)
94
  except Exception as e:
95
  st.markdown(f"""<p style="color: #e80000;font-size: 15px;font-family: sans-serif; text-align:left;margin-bottom: 0px; height: 5px">Document not submitted. Please upload a pdf and then click on 'submit'. Only then we can answer your question</p>""", unsafe_allow_html=True)
96
- return None '''
97
 
98
 
99
- new_db = FAISS.load_local("faiss_index", embeddings)
100
- docs = new_db.similarity_search(user_question)
101
 
102
  chain = get_conversational_chain()
103
 
 
88
 
89
  def user_input(user_question):
90
  embeddings = GoogleGenerativeAIEmbeddings(model = "models/embedding-001")
91
+ try:
92
  new_db = FAISS.load_local("faiss_index", embeddings, allow_dangerous_deserialization=True)
93
  docs = new_db.similarity_search(user_question)
94
  except Exception as e:
95
  st.markdown(f"""<p style="color: #e80000;font-size: 15px;font-family: sans-serif; text-align:left;margin-bottom: 0px; height: 5px">Document not submitted. Please upload a pdf and then click on 'submit'. Only then we can answer your question</p>""", unsafe_allow_html=True)
96
+ return None
97
 
98
 
99
+ #new_db = FAISS.load_local("faiss_index", embeddings)
100
+ #docs = new_db.similarity_search(user_question)
101
 
102
  chain = get_conversational_chain()
103