the input stored in user_question i need when press enter the txt in textbox getting clear and the output displing what can i did i tried js and streamlit function but when enter input and press send btn or press enter no output displaying
这是一个图像输入单词按下的示例,然后输入
文本框没看清楚
看来,你必须做一个功能才能清除它
像这样:
import streamlit as st
def clear_text():
st.session_state["text"] = ""
input = st.text_input("text", key="text")
st.button("clear text input", on_click=clear_text)
st.write(input)
正如这里所解释的:streamlit问题