I am creating a chat bot using streamlit chat_input and chat_message component. Using st.write for response from AWS Claude model doesn't recognise '\n\n' in the response, whereas the same response when copied and used in st.write works fine

st.write(response) ----not recognising the \n\n
st.write(" Based on the provided table, the input with the highest electricity production value on October 4, 2023 was:\n\nBuilding 353, with a value_sum of 0.49414 MW.") ----when copied and pasted in side the write function it works fine.

You can try with st.markdown(response)

Markdown also gives the same issue.