Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -190,6 +190,11 @@ if user_input:
|
|
190 |
st.session_state.response_ready = True # Enables follow-up response cycle
|
191 |
|
192 |
if st.session_state.response_ready and st.session_state.follow_up:
|
|
|
193 |
st.session_state.chat_history.append({'role': 'assistant', 'content': st.session_state.follow_up})
|
|
|
|
|
194 |
st.markdown(f"<div class='assistant-msg'><strong>HAL:</strong> {st.session_state.follow_up}</div>", unsafe_allow_html=True)
|
|
|
|
|
195 |
st.session_state.response_ready = False
|
|
|
190 |
st.session_state.response_ready = True # Enables follow-up response cycle
|
191 |
|
192 |
if st.session_state.response_ready and st.session_state.follow_up:
|
193 |
+
# ✅ Save HAL's follow-up question in chat history
|
194 |
st.session_state.chat_history.append({'role': 'assistant', 'content': st.session_state.follow_up})
|
195 |
+
|
196 |
+
# ✅ Display the follow-up question
|
197 |
st.markdown(f"<div class='assistant-msg'><strong>HAL:</strong> {st.session_state.follow_up}</div>", unsafe_allow_html=True)
|
198 |
+
|
199 |
+
# ✅ Reset response state so user can type next input
|
200 |
st.session_state.response_ready = False
|