Is it possible to display an html file in streamlit?

I have created an interactive folium map and I have saved it as an html file.

I would like to know whether there is a way to display it in my streamlit app.

Thanks in advance for your help :grinning:

PS: I know that I can directly a folium map through streamlit via folium_static(map).

Hi @Alberto_De_Beneditti, welcome to the Streamlit community! Yes, you can use components.html:

Best,
Randy

1 Like

Hi @randyzwitch!
I tried with components.html, but instead of showing the interactive folium map I visualize a string containing the name of the file (e.g. map1.html).

You have to provide the content of the html file, not the filename.

2 Likes