CCockrum commited on
Commit
ba5700e
·
verified ·
1 Parent(s): fe6a21e

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -1
app.py CHANGED
@@ -153,12 +153,17 @@ if user_input:
153
  user_text=user_input,
154
  chat_history=st.session_state.chat_history
155
  )
 
 
 
 
156
  if image_url:
157
  st.image(image_url, caption="NASA Image of the Day")
158
 
159
  st.session_state.follow_up = follow_up
160
  st.session_state.response_ready = True
161
 
 
162
  if st.session_state.response_ready and st.session_state.follow_up:
163
- st.write(f"**HAL:** {st.session_state.follow_up}")
164
  st.session_state.response_ready = False
 
153
  user_text=user_input,
154
  chat_history=st.session_state.chat_history
155
  )
156
+
157
+ # ✅ Replace st.write() with st.markdown() to ensure multi-line responses are fully displayed
158
+ st.markdown(f"<div class='assistant-msg'><strong>HAL:</strong> {response}</div>", unsafe_allow_html=True)
159
+
160
  if image_url:
161
  st.image(image_url, caption="NASA Image of the Day")
162
 
163
  st.session_state.follow_up = follow_up
164
  st.session_state.response_ready = True
165
 
166
+ # Display follow-up question if available
167
  if st.session_state.response_ready and st.session_state.follow_up:
168
+ st.markdown(f"<div class='assistant-msg'><strong>HAL:</strong> {st.session_state.follow_up}</div>", unsafe_allow_html=True)
169
  st.session_state.response_ready = False