Spaces:
Sleeping
Sleeping
Update app.py
Browse files435 unmodified lines4364374384394394404414425 unmodified lines44844945045145245345445545145245345445545623 unmodified lines480481482485486487488489483484485486491492493494495487488489490491492435 unmodified lines st.sidebar.markdown('''This is a chatbot to help you learn more about {organization_name}''') domain = st.sidebar.selectbox("Select a topic", {{[domain["name"] for domain in domain_info]}}) domain = st.sidebar.selectbox("Select a topic", {{[d["name"] for d in domain_info]}}) special_threshold = 0.3 5 unmodified lines st.session_state.messages = [] st.session_state.curr_domain = "" # Load the dataset from a provided source. ### ### #### ## for d in domain_info: if domain == d['name']: dataset = load_dataset(d['link']) initial_input = "Tell me about {organization_name}" 23 unmodified lines if "curr_domain" not in st.session_state: st.session_state.curr_domain = "" ### ### ### init_messages dict (one key per domain) ### ### init_messages = {{}} for d in domain_info: init_messages[d['name']] = d['purpose'] ### ### ### chatbot_instructions dict (one key per domain) ### ### chatbot_instructions = {{}} for d in domain_info: chatbot_instructions[d['name']] = d['instructions'] # Embed and store the first N supports for this demo with st.spinner("Loading, please be patient with us ... 🙏"):app.py+10-16