KUNAL SHAW commited on
Commit
42222e5
·
1 Parent(s): f9c215a

Fix st.chat_input outside columns

Browse files
Files changed (1) hide show
  1. streamlit_app/app.py +3 -3
streamlit_app/app.py CHANGED
@@ -259,6 +259,9 @@ if not st.session_state.pipeline:
259
  st.markdown(f"- {query}")
260
 
261
  else:
 
 
 
262
  # Chat interface
263
  col1, col2 = st.columns([2, 1])
264
 
@@ -273,9 +276,6 @@ else:
273
  with st.chat_message(message["role"]):
274
  st.write(message["content"])
275
 
276
- # Chat input
277
- user_input = st.chat_input("Ask a question about the Agentic AI eBook...")
278
-
279
  if user_input:
280
  # Add user message to chat
281
  st.session_state.messages.append({"role": "user", "content": user_input})
 
259
  st.markdown(f"- {query}")
260
 
261
  else:
262
+ # Chat input MUST be outside columns/containers
263
+ user_input = st.chat_input("Ask a question about the Agentic AI eBook...")
264
+
265
  # Chat interface
266
  col1, col2 = st.columns([2, 1])
267
 
 
276
  with st.chat_message(message["role"]):
277
  st.write(message["content"])
278
 
 
 
 
279
  if user_input:
280
  # Add user message to chat
281
  st.session_state.messages.append({"role": "user", "content": user_input})