Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -41,11 +41,7 @@ def conversational_chat(query):
|
|
41 |
for i in st.session_state['history']:
|
42 |
if i is not None:
|
43 |
previous_response += f"Human: {i[0]}\n Chatbot: {i[1]}"
|
44 |
-
|
45 |
-
for j in st.session_state["docs"]:
|
46 |
-
if j is not None:
|
47 |
-
docs += j
|
48 |
-
provided_docs = docs
|
49 |
result = llm_chain.predict(chat_history=previous_response, human_input=query, provided_docs=provided_docs)
|
50 |
st.session_state['history'].append((query, result))
|
51 |
return result
|
|
|
41 |
for i in st.session_state['history']:
|
42 |
if i is not None:
|
43 |
previous_response += f"Human: {i[0]}\n Chatbot: {i[1]}"
|
44 |
+
provided_docs = "".join(st.session_state["docs"])
|
|
|
|
|
|
|
|
|
45 |
result = llm_chain.predict(chat_history=previous_response, human_input=query, provided_docs=provided_docs)
|
46 |
st.session_state['history'].append((query, result))
|
47 |
return result
|