nyoo827 commited on
Commit
1e4267b
Β·
1 Parent(s): edbfb77

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -3
app.py CHANGED
@@ -100,11 +100,12 @@ def handle_userinput(user_question):
100
 
101
  # λŒ€ν™” 체인을 μ‚¬μš©ν•˜μ—¬ μ‚¬μš©μž μ§ˆλ¬Έμ— λŒ€ν•œ 응닡을 μƒμ„±ν•©λ‹ˆλ‹€.
102
  st.session_state.conversation = {'question': user_question}
103
- st.session_state.chat_history = response['chat_history']
 
104
  #response = st.session_state.conversation
105
 
106
- if 'chat_history' in response:
107
- st.session_state.chat_history = response['chat_history']
108
  for i, message in enumerate(st.session_state.chat_history):
109
  if i % 2 == 0:
110
  st.write(user_template.replace("{{MSG}}", message.content), unsafe_allow_html=True)
 
100
 
101
  # λŒ€ν™” 체인을 μ‚¬μš©ν•˜μ—¬ μ‚¬μš©μž μ§ˆλ¬Έμ— λŒ€ν•œ 응닡을 μƒμ„±ν•©λ‹ˆλ‹€.
102
  st.session_state.conversation = {'question': user_question}
103
+
104
+ #st.session_state.chat_history = response['chat_history']
105
  #response = st.session_state.conversation
106
 
107
+ if 'chat_history' in st.session_state.conversation:
108
+ st.session_state.chat_history = st.session_state.conversation['chat_history']
109
  for i, message in enumerate(st.session_state.chat_history):
110
  if i % 2 == 0:
111
  st.write(user_template.replace("{{MSG}}", message.content), unsafe_allow_html=True)