shubhendu-ghosh commited on
Commit
b714b43
1 Parent(s): 7e5e56e

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -2
app.py CHANGED
@@ -91,8 +91,9 @@ def user_input(user_question):
91
  try:
92
  new_db = FAISS.load_local("faiss_index", embeddings)
93
  docs = new_db.similarity_search(user_question)
94
- except error:
95
- raise Exception("Document not submitted. Please upload a pdf and then click on 'submit'. Only then we can answer yyour question")
 
96
 
97
  new_db = FAISS.load_local("faiss_index", embeddings)
98
  docs = new_db.similarity_search(user_question)
 
91
  try:
92
  new_db = FAISS.load_local("faiss_index", embeddings)
93
  docs = new_db.similarity_search(user_question)
94
+ except Exception as e:
95
+ raise Exception("Document not submitted. Please upload a pdf and then click on 'submit'. Only then we can answer your question")
96
+
97
 
98
  new_db = FAISS.load_local("faiss_index", embeddings)
99
  docs = new_db.similarity_search(user_question)