Streamlit-feedback is a Streamlit component that allows developers to easily collect structured or free-form user feedback, such as thumbs up/down, emoji faces, or text comments, directly within their Streamlit applications. It is currently at version 0.1.4 and receives updates for compatibility with new Streamlit versions and feature enhancements, maintaining an active development status.
pip install streamlit-feedbackVerified import paths — ran on the pinned version, not inferred.
This quickstart demonstrates how to integrate `streamlit-feedback` into a basic Streamlit application. It shows both 'thumbs' and 'faces' feedback types, including how to handle the returned feedback and the essential use of the `key` parameter for multiple components. The app must be run using `streamlit run`.
Always launch your application using the `streamlit run` command.
Provide a unique string for the `key` parameter for every `st_feedback` call, e.g., `st_feedback(..., key='unique_id_1')`.
Always check `feedback_result['feedback_type']` before trying to access `feedback_result['score']` or `feedback_result['text']` to ensure correct data parsing, as not all fields are present for all types.