Git Product home page Git Product logo

Comments (3)

jeffkayne avatar jeffkayne commented on June 26, 2024

The component works inside of an expander. Check out our example apps: https://github.com/trubrics/streamlit-feedback/blob/main/streamlit_feedback/examples.py

from streamlit-feedback.

aymbot avatar aymbot commented on June 26, 2024

Hey @jeffkayne !

Thanks for the example apps, sadly none used expanders. I re-tested the above code. When I insert a feedback, close the expander, re-run a query, then re-open the expander, the feedback does indeed disappear (see below to what I mean with disappears).
So it works initially but after closing the expander and I generate a new query it disappears. Here is another test example, query is just a function that does an inference query.

        query_text = st.text_input("Enter your query here")
        if query_text:
            query_result = query(query_text)
            st.write_stream(
                stream_data(query_result)
            )
            with st.expander("Feedback Input"):
                feedback_result = streamlit_feedback(
                    feedback_type="thumbs",
                    optional_text_label="[Optional] Please provide an explanation",
                    align="flex-start",
                    on_submit=handle_feedback,
                    args=(query_text, query_result,),
                    key=f"feedback_{query_text}"
                )

            if feedback_result:
                st.session_state.feedback.append(feedback_result)

            with st.expander("Feedback"):
                st.session_state.feedback

image

from streamlit-feedback.

aymbot avatar aymbot commented on June 26, 2024

Hey @jeffkayne ! I just wanted to ping this again, as this issue still persists. Thanks in advance for the heads up!

from streamlit-feedback.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.