Mpavan45 commited on
Commit
1441e1b
·
verified ·
1 Parent(s): 100ce6d

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +7 -10
app.py CHANGED
@@ -129,17 +129,14 @@ with chat_container:
129
  for role, content in st.session_state.messages:
130
  with st.chat_message(role):
131
  st.markdown(content)
132
- # "New Chat" button (Right Side of Input Box)
133
- col1, col2 = st.columns([4, 1])
134
-
135
  # User input at the bottom
136
- with col1:
137
- if st.button("🆕 New Chat"):
138
- st.session_state.session_id = str(uuid.uuid4()) # Generate new session
139
- st.session_state.messages = [] # Clear chat history
140
- st.rerun() # Refresh the app
141
- # 🔹 **Fixed Bottom User Input**
142
- user_input = st.text_input("Type your message here:", key="user_message")
143
 
144
  # If user submits a message
145
  if user_input:
 
129
  for role, content in st.session_state.messages:
130
  with st.chat_message(role):
131
  st.markdown(content)
132
+
 
 
133
  # User input at the bottom
134
+ # 🔹 **Fixed Bottom User Input**
135
+ user_input = st.text_input("Type your message here:", key="user_message")
136
+ if st.button("🆕 New Chat"):
137
+ st.session_state.session_id = str(uuid.uuid4()) # Generate new session
138
+ st.session_state.messages = [] # Clear chat history
139
+ st.rerun() # Refresh the app
 
140
 
141
  # If user submits a message
142
  if user_input: