Spaces:
Runtime error
Runtime error
Commit
·
fadc3b5
1
Parent(s):
238975c
Update app.py
Browse files
app.py
CHANGED
@@ -247,13 +247,13 @@ class ChatDocumentQA:
|
|
247 |
chat_history.append((message, response))
|
248 |
return "", chat_history
|
249 |
else:
|
250 |
-
|
251 |
-
|
252 |
-
|
253 |
-
|
254 |
-
|
255 |
-
|
256 |
-
|
257 |
except:
|
258 |
chat_history.append((message, "Please Upload Document or URL"))
|
259 |
return "", chat_history
|
|
|
247 |
chat_history.append((message, response))
|
248 |
return "", chat_history
|
249 |
else:
|
250 |
+
vectorstore = state["knowledge_base"]
|
251 |
+
chat = self._create_conversation_chain(vectorstore)
|
252 |
+
# user_ques = {"question": message}
|
253 |
+
print("chat_history",chat_history)
|
254 |
+
response = chat({"question": message,"chat_history": chat_history})
|
255 |
+
chat_history.append((message, response["answer"]))
|
256 |
+
return "", chat_history
|
257 |
except:
|
258 |
chat_history.append((message, "Please Upload Document or URL"))
|
259 |
return "", chat_history
|