suriya7 commited on
Commit
3e27d5b
·
verified ·
1 Parent(s): bcfd398

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -31,7 +31,7 @@ llm_chain = LLMChain(
31
 
32
  previous_response = ""
33
  def conversational_chat(user_query):
34
- previous_response = "".join([f"Human: {i[0]}\nChatbot: {i[1]}" for i in st.session_state['history'] if i is not None])
35
  result = llm_chain.predict(
36
  question=user_query,
37
  previous_history = previous_response
@@ -65,10 +65,10 @@ with container:
65
  st.session_state['assistant'].append(output)
66
 
67
 
68
- ## Display chat history
69
  if st.session_state['assistant']:
70
  with response_container:
71
  for i in range(len(st.session_state['assistant'])):
72
  if i != 0:
73
  message(st.session_state["human"][i], is_user=True, key=str(i) + '_user', avatar_style="adventurer")
74
- message(st.session_state["assistant"][i], key=str(i), avatar_style="bottts")
 
31
 
32
  previous_response = ""
33
  def conversational_chat(user_query):
34
+ previous_response = "".join([f"User: {i[0]}\nChatbot: {i[1]}" for i in st.session_state['history'] if i is not None])
35
  result = llm_chain.predict(
36
  question=user_query,
37
  previous_history = previous_response
 
65
  st.session_state['assistant'].append(output)
66
 
67
 
68
+ # Display chat history
69
  if st.session_state['assistant']:
70
  with response_container:
71
  for i in range(len(st.session_state['assistant'])):
72
  if i != 0:
73
  message(st.session_state["human"][i], is_user=True, key=str(i) + '_user', avatar_style="adventurer")
74
+ message(st.session_state["assistant"][i], key=str(i), avatar_style="bottts")