How do i change the app title and favicon?

how do i change the app title and favicon ?

2 Likes

its always like this image

Yes, I would like to know this as well.

Hi @qxlsz, thanks for your question. There is no way at the moment to change favicon. As for title, it reflects the name of your script, but no way to customize it. I am going to create a feature request for this.

Matteo

1 Like
1 Like

This topic is old and now the feature has been implemented:

st.beta_set_page_config(page_title='your_title', page_icon = favicon, layout = 'wide', initial_sidebar_state = 'auto')
# favicon being an object of the same kind as the one you should provide st.image() with (ie. a PIL array for example) or a string (url or local file path)

You can read page 86 of this documentation for more details.
Hope it’ll help anyone…

12 Likes

If you find this with google: it’s not beta anymore, so st.set_page_config(bladibla) does the trick
https://docs.streamlit.io/en/stable/api.html#streamlit.set_page_config

2 Likes

When i acesses my app troughthout heroku i still see the “my_app_title * Streamlit” and i want the * *Streamlit gone…how can i do that? when i run localy i see whithout the *Streamlit name at my app title… :grimacing:

1

You need to upgrade the version of Streamlit. Version 0.84 removes the appending behavior you are experiencing.

Okay, but my streamlit app it’s in version 0.85…

1 Like

Hi @feliperoque :wave:

I suspect your local installation of Streamlit is version 0.85, while the version on Heroku is older. Could you update Streamlit on Heroku and check if you’re observing the appending behavior?

1 Like

@snehankekre how should i do that? because where i know, when you upload your streamlit version to more newest version and do a push through github, automatically heroku is updated…but seems like he isn’t updating to newest version…

Hi guys, i solved this by passing the latest version of streamlit (in my case 0.85.0) in requirement.txt. Then, i did a push do github and heroku automatically update the version! :partying_face:

1 Like

You should now use:

st.set_page_config(page_title=None, page_icon=None, layout="centered", initial_sidebar_state="auto", menu_items=None)

Please refer to this documentation for the favicon and title :

I updated this answer since it is the first option when googling for this.

1 Like

@sebastiandres I tried this but I am getting the name of my page.Streamlit when I push it to github. On my localhost it works fine. Any ideas?

st.set_page_config(page_title='XYZ', layout = 'wide', page_icon = 'logo2.png', initial_sidebar_state = 'auto')

This is my requirements.txt file:

streamlit== 1.8.1
openpyxl
pandas
plotly.express
1 Like

Ohhh, now I see your point. It’s the minor diference between “XYZ” and “XYZ · Streamlit”.

Screen Shot 2022-05-18 at 09.04.08

I tried a couple of ideas without too much success. It seems that share.streamlit.io changes the app title as the last step of loading the page, so it might not be possible at all.

You could always host your app on other places (heroku is mentioned frequently) if you want more control of how it’s build.
Share.streamlit.io being offered as a free service comes with limitations!

Even then, it is still not working. .Streamlit is appended to the title. Is the issue fixed?

It is not an issue, it is a design election by the Streamlit team for the the share.streamlit.io platform. Why is having that text such an issue?

You could always embed the Streamlit in an iframe of a simple html, if you must hide that you’re using the Streamlit cloud.

1 Like

Thanks for clarifying what the problem is @sebastiandres.

In the case of Streamlit Cloud, I don’t even know that it’s a conscious design decision, it could just be an artifact of not realizing it needed to be removed in the separate Streamlit Cloud codebase. Either way, yes, it’s not a bug.

2 Likes

I believe that you need to rewrite the base index.html file that is used as a template for your app. It is buried deep in the installation of streamlit. Not sure you can do anything about that in the communicty cloud but you can access that file when deploying inside a docker image.

Even if you change the icon with st.set_page_config, the old index is still sometimes pulled depending on where you share the link, like Slack.

1 Like