-
Notifications
You must be signed in to change notification settings - Fork 255
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
Add ability to define custom image as an avatar by passing image url #34
Conversation
Hello! Can you explain, how install the correct version of st-chat with this functionality? And please add the snippet with an example of using it. |
Right now it seems that the repositiry is not up to date, since the React component is still in an older version. I did build my own version, this should also work for you :) Quick instructions to generate the newest build:
|
Hey is this packaged as a part of the newest release ? @yashppawar @YashVardhan-AI it would be great if guys could get this all packaged as a new version |
Same issue here there is no "avatar" parameter in the latest version .. |
sorry for the misunderstanding, the PR suggested message('user message', is_user=True, logo=f'{USER_AVATAR_URL}') check out static file serving if you want to use local image... |
1. clean code 2. add the avatar base on sreamlit_chat: AI-Yash/st-chat#34
* Upgrade the streamlit version from 1.22.0 to 1.26.0 Reference: 1. AI-Yash/st-chat#34 2. https://docs.streamlit.io/library/advanced-features/static-file-serving 3. [If the image not found in cloud](https://discuss.streamlit.io/t/streamlit-chat-avatars-not-working-on-cloud/46713)
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):
|
Hello @kz24kz24kz24, you can use Static File Serving with streamlit for your local images. Alternatively, you can switch to Chat Elements from streamlit |
Adds the ability to define a custom Avatar image using an image URL
Example