Update app.py
Browse files
app.py
CHANGED
@@ -171,6 +171,7 @@ refresh_chat()
|
|
171 |
st.session_state.user_text = st.chat_input(placeholder="Enter your text here.")
|
172 |
|
173 |
# When the user enters new text
|
|
|
174 |
if st.session_state.user_text:
|
175 |
# Display the user's message
|
176 |
with st.chat_message("user", avatar=st.session_state.avatars['user']):
|
@@ -188,12 +189,16 @@ if st.session_state.user_text:
|
|
188 |
continue_last=False
|
189 |
)
|
190 |
st.markdown(response)
|
|
|
191 |
|
192 |
# Clear the user input
|
193 |
st.session_state.user_text = None
|
194 |
|
195 |
-
if
|
196 |
-
|
|
|
|
|
|
|
197 |
|
198 |
# If "Continue" button was pressed
|
199 |
if need_continue:
|
|
|
171 |
st.session_state.user_text = st.chat_input(placeholder="Enter your text here.")
|
172 |
|
173 |
# When the user enters new text
|
174 |
+
can_continue = False
|
175 |
if st.session_state.user_text:
|
176 |
# Display the user's message
|
177 |
with st.chat_message("user", avatar=st.session_state.avatars['user']):
|
|
|
189 |
continue_last=False
|
190 |
)
|
191 |
st.markdown(response)
|
192 |
+
can_continue = True
|
193 |
|
194 |
# Clear the user input
|
195 |
st.session_state.user_text = None
|
196 |
|
197 |
+
if can_continue:
|
198 |
+
if st.button("Continue"):
|
199 |
+
need_continue = True
|
200 |
+
else:
|
201 |
+
need_continue = False
|
202 |
|
203 |
# If "Continue" button was pressed
|
204 |
if need_continue:
|