Spaces:
Sleeping
Sleeping
Commit
•
ea00a3f
1
Parent(s):
85eb1e5
Update app.py
Browse files
app.py
CHANGED
@@ -124,9 +124,20 @@ def process_user_question(user_question):
|
|
124 |
st.session_state.chat_history = response['chat_history']
|
125 |
|
126 |
# st.empty()
|
|
|
|
|
127 |
results_string = ""
|
128 |
|
|
|
|
|
129 |
for i, message in enumerate(st.session_state.chat_history):
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
130 |
if i % 2 == 0:
|
131 |
# st.write(user_template.replace(
|
132 |
# "{{MSG}}", message.content), unsafe_allow_html=True)
|
|
|
124 |
st.session_state.chat_history = response['chat_history']
|
125 |
|
126 |
# st.empty()
|
127 |
+
|
128 |
+
results_size = len( response['chat_history'] )
|
129 |
results_string = ""
|
130 |
|
131 |
+
print('results_size is: ', results_size )
|
132 |
+
|
133 |
for i, message in enumerate(st.session_state.chat_history):
|
134 |
+
|
135 |
+
print('results_size on msg: ', results_size, i, ( results_size - 6 ) )
|
136 |
+
if results_size > 6:
|
137 |
+
if i < ( results_size - 6 ):
|
138 |
+
print( 'skipped line', i)
|
139 |
+
continue
|
140 |
+
|
141 |
if i % 2 == 0:
|
142 |
# st.write(user_template.replace(
|
143 |
# "{{MSG}}", message.content), unsafe_allow_html=True)
|