'how to deploy streamlit with secrets.toml on heroku?

Hi I have an application that I would like to deploy on heroku. The question is how would I deploy a streamlit app with secrets.toml?

Currently the connection can be done locally via this

credentials = service_account.Credentials.from_service_account_info(
    st.secrets["gcp_service_account"])

However when I deploy it to heroku, this doesn't seem to connect.

Please help.



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source