I am trying to build a simple app where user will enter data & give feedback based on predicted result.
import streamlit as st def main(): st.title("Data Categorization") txt = st.text_area("Paste your data here..") if st.button("Find Category"): try: if txt != '': value = st.selectbox("Agree with result", ["Yes, I agree..", "Nah!! I don't"]) if st.button("Submit report"): if value == "Yes, I agree..": #st.write(value) print('Do this ...') elif value != "Nah!! I don't agree": print('Do that ...') st.write("Thank You..") else: st.write('No content found') except: st.write('Looks like I am having problem connecting my backend') if __name__ == '__main__': main()
But when I select any value from dropdown:
The rendered elements getting disappears :
Don’t know where I am going wrong. Need help here…