CCockrum commited on
Commit
a032c14
·
verified ·
1 Parent(s): 0f3680d

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +12 -0
app.py CHANGED
@@ -158,6 +158,17 @@ user_input = st.text_area("Type your message:", height=100)
158
  # Create a placeholder for the Send button so it can be removed dynamically
159
  send_button_placeholder = st.empty()
160
 
 
 
 
 
 
 
 
 
 
 
 
161
  # Only show the Send button if HAL has not responded
162
  if not st.session_state.response_ready:
163
  if send_button_placeholder.button("Send"):
@@ -204,3 +215,4 @@ if st.sidebar.button("Reset Chat"):
204
  st.session_state.response_ready = False # Reset so the Send button reappears
205
  st.experimental_rerun()
206
 
 
 
158
  # Create a placeholder for the Send button so it can be removed dynamically
159
  send_button_placeholder = st.empty()
160
 
161
+ # Only show the Send button if HAL has not responded
162
+ # Ensure session state is initialized for response tracking
163
+ if "response_ready" not in st.session_state:
164
+ st.session_state.response_ready = False # False until HAL responds
165
+
166
+ # Input box for user message
167
+ user_input = st.text_area("Type your message:", height=100)
168
+
169
+ # Create a placeholder for the Send button so it can be removed dynamically
170
+ send_button_placeholder = st.empty()
171
+
172
  # Only show the Send button if HAL has not responded
173
  if not st.session_state.response_ready:
174
  if send_button_placeholder.button("Send"):
 
215
  st.session_state.response_ready = False # Reset so the Send button reappears
216
  st.experimental_rerun()
217
 
218
+