Resize image in a web-app of LLM chat

Hello guys,
I’m creating a web-app for LLM, but I have a problem of visualizing the images because sometimes the images are cutted like in this way:

I put in my code this string:

            for message in st.session_state.messages:
                if message["role"] == "system":
                    continue
                with st.chat_message(message["role"]):
                    st.markdown(message["content"])
                    if "image" in message:
                        components.html(message["image"], height=450)

Inserting as height property a maximum one, but I want to find a way to resize everytime, I catch the .html generated figure from plotly library

How can I do it?

Thanks for every answer!

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.