CCockrum commited on
Commit
6b06c5f
Β·
verified Β·
1 Parent(s): 359ae35

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +10 -10
app.py CHANGED
@@ -140,21 +140,21 @@ def get_response(system_message, chat_history, user_text, max_new_tokens=256):
140
  #st.sidebar.success(f"Conversation saved as {conv_id}.")
141
 
142
  # Display saved conversation links
143
- if st.session_state.saved_conversations:
144
- for conv_id in st.session_state.saved_conversations:
145
- if st.sidebar.button(f"Load {conv_id}"):
146
- st.session_state.chat_history = st.session_state.saved_conversations[conv_id].copy()
147
- st.sidebar.info(f"Loaded {conv_id}.")
148
 
149
  # --- Chat UI Rendering ---
150
  st.title("πŸš€ HAL - Your NASA AI Assistant")
151
  st.markdown("🌌 *Ask me about space, NASA, and beyond!*")
152
 
153
- if st.sidebar.button("Reset Chat"):
154
- st.session_state.chat_history = [{"role": "assistant", "content": "Hello! How can I assist you today?"}]
155
- st.session_state.response_ready = False
156
- st.session_state.follow_up = ""
157
- st.experimental_rerun()
158
 
159
  st.markdown("<div class='container'>", unsafe_allow_html=True)
160
  for message in st.session_state.chat_history:
 
140
  #st.sidebar.success(f"Conversation saved as {conv_id}.")
141
 
142
  # Display saved conversation links
143
+ #if st.session_state.saved_conversations:
144
+ #for conv_id in st.session_state.saved_conversations:
145
+ #if st.sidebar.button(f"Load {conv_id}"):
146
+ #st.session_state.chat_history = st.session_state.saved_conversations[conv_id].copy()
147
+ #st.sidebar.info(f"Loaded {conv_id}.")
148
 
149
  # --- Chat UI Rendering ---
150
  st.title("πŸš€ HAL - Your NASA AI Assistant")
151
  st.markdown("🌌 *Ask me about space, NASA, and beyond!*")
152
 
153
+ #if st.sidebar.button("Reset Chat"):
154
+ #st.session_state.chat_history = [{"role": "assistant", "content": "Hello! How can I assist you today?"}]
155
+ #st.session_state.response_ready = False
156
+ #st.session_state.follow_up = ""
157
+ #st.experimental_rerun()
158
 
159
  st.markdown("<div class='container'>", unsafe_allow_html=True)
160
  for message in st.session_state.chat_history: