Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Avatar Modifications #4

Open
sagerock opened this issue May 24, 2023 · 0 comments
Open

Avatar Modifications #4

sagerock opened this issue May 24, 2023 · 0 comments

Comments

@sagerock
Copy link

This app is so awesome. The code is super clean and it's really easy to use. I thought I might put some information in here from things I've learned along the way. If this isn't appropriate just let me know (I'm extremely new to all this.)

I wanted to have a little more control over the avatars that appear on the chatbot. So, in here:
https://github.com/stephansturges/GPTflix/blob/main/chat/main.py

I updated the random integer code a bit like this:

# random user picture
# user_av = random.randint(0, 100)
user_av = 3

# random bott picture
# bott_av = random.randint(0, 100)
bott_av = 10

And then at the very bottom of main.py I can change the avatar_style here:

if st.session_state['generated']:
    for i in range(len(st.session_state['generated'])-1, -1, -1):
        message(st.session_state["generated"][i],seed=bott_av , key=str(i))
        message(st.session_state['past'][i], is_user=True,avatar_style="personas",seed=user_av, key=str(i) + '_user')

Honestly, I am still not exactly sure how the avatars work. I think it has something to do with these:
https://www.dicebear.com/styles

If I get to the bottom of it further I'll let you know.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant