St.write can't recognise '\n\n' in the response but when copied and used in the prints with new line

Hey @Darshan_Devesan,

Check out this thread where we were chatting about essentially the same issue.

The TLDR is: to get Streamlit to recognize the newline, you need to put two whitespace characters in front of the newline character (related GitHub Issue).