Spaces:
Running
Running
shubhendu-ghosh
commited on
Commit
•
b714b43
1
Parent(s):
7e5e56e
Update app.py
Browse files
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
|
95 |
-
raise Exception("Document not submitted. Please upload a pdf and then click on 'submit'. Only then we can answer
|
|
|
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)
|