How do I display a text file directly on the User Interface

try html.Div(your_string, style={'whiteSpace': 'pre-line'}). See more options here: https://developer.mozilla.org/en-US/docs/Web/CSS/white-space

1 Like