Skip to content

pierrelouisbescond/streamlit-chat-ui-improvement

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

12 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

🀩 Streamlit Chat Improvement

This side project aims to add new functionalities to the standard Streamlit chat interface:

  • πŸ“₯ Chat history export (in JSON format)
  • 🧹 Clear chat
  • 🎨 Image upload (or any another file) thanks to st.experimental_dialog (Streamlit β‰₯ 1.35.0)
  • πŸ” Rerun last question
  • πŸ‘ and πŸ‘Ž feedback buttons (registered in the logs)
  • πŸ’¬ tokens count
  • πŸ‘©β€πŸ’» chat avatars personalization

[01/06 update]: Thanks to the awesome work of bouzidanas and its streamlit-float library, the chat options stay close to the chat input 🀩.

The video below shows how they integrate into the UI:

Streamlit Chat Improved UI

The logs corresponding to the feedback buttons are:

INFO:root:2024-05-22 14:35:23: positive: [{"role": "user", "content": "1+1"}, {"role": "assistant", "content": "1+1 equals 2."}]
INFO:root:2024-05-22 14:35:30: negative: [{"role": "user", "content": "2+2"}, {"role": "assistant", "content": "2 + 2 equals 4."}]

The demo hosted here is limited to 3 questions and/or 300 tokens.

The code does not leverage all possible improvements offered by Streamlit (like caching) so I look forward to getting pull requests to make this small project better 😁

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages