CCockrum commited on
Commit
72d8888
·
verified ·
1 Parent(s): b998175

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +11 -0
app.py CHANGED
@@ -149,6 +149,9 @@ st.markdown("</div>", unsafe_allow_html=True)
149
  # --- Single Input Box for Both Initial and Follow-Up Messages ---
150
  user_input = st.chat_input("Type your message here...") # Single input box
151
 
 
 
 
152
  if user_input:
153
  response, follow_up, st.session_state.chat_history, image_url = get_response(
154
  system_message="You are a helpful AI assistant.",
@@ -173,6 +176,14 @@ if st.session_state.response_ready and st.session_state.follow_up:
173
  st.session_state.response_ready = False
174
 
175
 
 
 
 
 
 
 
 
 
176
  # Conversational Follow-up with "Enter to Send"
177
  if st.session_state.response_ready and st.session_state.follow_up:
178
  st.markdown(f"<div class='assistant-msg'><strong>HAL:</strong> {st.session_state.follow_up}</div>", unsafe_allow_html=True)
 
149
  # --- Single Input Box for Both Initial and Follow-Up Messages ---
150
  user_input = st.chat_input("Type your message here...") # Single input box
151
 
152
+ # --- Single Input Box for Both Initial and Follow-Up Messages ---
153
+ user_input = st.chat_input("Type your message here...") # Single input box
154
+
155
  if user_input:
156
  response, follow_up, st.session_state.chat_history, image_url = get_response(
157
  system_message="You are a helpful AI assistant.",
 
176
  st.session_state.response_ready = False
177
 
178
 
179
+ # Display follow-up question inside chat if available
180
+ if st.session_state.response_ready and st.session_state.follow_up:
181
+ st.markdown(f"<div class='assistant-msg'><strong>HAL:</strong> {st.session_state.follow_up}</div>", unsafe_allow_html=True)
182
+
183
+ # Reset response state so user can type next input
184
+ st.session_state.response_ready = False
185
+
186
+
187
  # Conversational Follow-up with "Enter to Send"
188
  if st.session_state.response_ready and st.session_state.follow_up:
189
  st.markdown(f"<div class='assistant-msg'><strong>HAL:</strong> {st.session_state.follow_up}</div>", unsafe_allow_html=True)