CosmickVisions commited on
Commit
3b7ed61
·
verified ·
1 Parent(s): a4a0207

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +24 -0
app.py CHANGED
@@ -141,6 +141,23 @@ st.markdown("""
141
  .clear-float {
142
  clear: both;
143
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
144
  </style>
145
  """, unsafe_allow_html=True)
146
 
@@ -1249,6 +1266,13 @@ def chatbot_interface():
1249
  st.markdown('<div class="chat-container">', unsafe_allow_html=True)
1250
  st.markdown('<div class="chat-header">💬 Cosmick AI Assistant</div>', unsafe_allow_html=True)
1251
 
 
 
 
 
 
 
 
1252
  # Display chat message history with improved styling
1253
  st.markdown('<div class="message-container">', unsafe_allow_html=True)
1254
  for message in st.session_state.messages:
 
141
  .clear-float {
142
  clear: both;
143
  }
144
+ .clear-button {
145
+ text-align: center;
146
+ margin-bottom: 10px;
147
+ }
148
+ .clear-button button {
149
+ background-color: #f0f0f0;
150
+ border: none;
151
+ border-radius: 20px;
152
+ padding: 5px 15px;
153
+ font-size: 0.8rem;
154
+ color: #666;
155
+ cursor: pointer;
156
+ transition: background-color 0.3s;
157
+ }
158
+ .clear-button button:hover {
159
+ background-color: #e0e0e0;
160
+ }
161
  </style>
162
  """, unsafe_allow_html=True)
163
 
 
1266
  st.markdown('<div class="chat-container">', unsafe_allow_html=True)
1267
  st.markdown('<div class="chat-header">💬 Cosmick AI Assistant</div>', unsafe_allow_html=True)
1268
 
1269
+ # Clear conversation button
1270
+ st.markdown('<div class="clear-button">', unsafe_allow_html=True)
1271
+ if st.button("Clear conversation"):
1272
+ st.session_state.messages = []
1273
+ st.rerun()
1274
+ st.markdown('</div>', unsafe_allow_html=True)
1275
+
1276
  # Display chat message history with improved styling
1277
  st.markdown('<div class="message-container">', unsafe_allow_html=True)
1278
  for message in st.session_state.messages: