Add a local custom PNG avatar image to a local running streamlit

hi! My codes are like the following; how can I replace the default avatar with a local image? I’m running it locally. Thanks so much!

def predict(input, max_length, top_p, temperature, history=None):
tokenizer, model = get_model()
if history is None:
history =

with container:
    if len(history) > 0:
        if len(history) > MAX_BOXES:
            history = history[-MAX_TURNS:]
        for i, (query, response) in enumerate(history):
            message(query, avatar_style="big-smile", key=str(i) + "_user")
            message(response, avatar_style="bottts", key=str(i) + "_robot")

    message(input, avatar_style="big-smile", key=str(len(history)) + "_user")
    st.write("Bot is typing:")

Hi @kz24kz24kz24,

Thanks for sharing your question! Please check out our guidelines on posting in the forum and update your post to include a runnable code snippet. Also, if you’re using a custom component, please specify which component.

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