Formatted display

Is it possible to format the results of a query with any style? I am getting the results of a query to GTP-3 with no separation lines, and it is difficult to read.

Hi @morispolanco,

Thanks for posting!

Can you share a little more info? What format are the results in? How are you hoping to format the results?

Caroline :balloon:

I get output like this:

Dear Santa,I hope you are doing well! I am writing to let you know that I have been a very good girl this year.

I would like:

Dear Santa,

I hope you are doing well! 
I am writing to let you know that I have been a very good girl this year.

Hi @morispolanco,

This has to do more with formatting text in Python than Streamlit necessarily – in this case, you probably want to look for the first comma and add a newline, then look for the next period, exclamation point, or question mark, and add another newline.

Check out the resource on formatting strings in Python/using regular expressions to do so:

After you format the string, you can just pass it to st.write as usual.

Caroline :balloon: