Want to change the avatar for the user and the bot withs custom .png file or icon.
Here is my code.
I tried to give the path of the image but it shows blank image in the UI.
Also tried bot_img = Image.open(image.png) and the give avatat = bot_img but didnt work.
if st.session_state.get('generated'):
with response_container:
for i in range(len(st.session_state['generated'])):
message(st.session_state["past"][i], is_user=True, key=f'{i}_user', avatar_style= "identicon")
if isinstance(st.session_state["generated"][i], pd.DataFrame):
st.write(st.session_state["generated"][i])
else:
message(st.session_state["generated"][i], key=f'{i}_ai', avatar_style="bottts")
New contributor
Murphy is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.