Spaces:
Sleeping
Sleeping
Update app.py
Browse files435 unmodified lines4364374384394404414425 unmodified lines44844945045145245345445545645745823 unmodified lines482483484485486487488489490491492493494495496497498435 unmodified linesst.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]}})special_threshold = 0.35 unmodified linesst.session_state.messages = []st.session_state.curr_domain = ""# Load the dataset from a provided source.############initial_input = "Tell me about {organization_name}"23 unmodified linesif "curr_domain" not in st.session_state:st.session_state.curr_domain = ""######### init_messages dict (one key per domain)############### chatbot_instructions dict (one key per domain)####### Embed and store the first N supports for this demowith st.spinner("Loading, please be patient with us ... ๐"):435 unmodified lines4364374384394404414425 unmodified lines44844945045145245345445545623 unmodified lines480481482483484485486487488489490491492435 unmodified linesst.sidebar.markdown('''This is a chatbot to help you learn more about {organization_name}''')domain = st.sidebar.selectbox("Select a topic", {{[d["name"] for d in domain_info]}})special_threshold = 0.35 unmodified linesst.session_state.messages = []st.session_state.curr_domain = ""for d in domain_info:if domain == d['name']:dataset = load_dataset(d['link'])initial_input = "Tell me about {organization_name}"23 unmodified linesif "curr_domain" not in st.session_state:st.session_state.curr_domain = ""init_messages = {{}}for d in domain_info:init_messages[d['name']] = d['purpose']chatbot_instructions = {{}}for d in domain_info:chatbot_instructions[d['name']] = d['instructions']# Embed and store the first N supports for this demowith st.spinner("Loading, please be patient with us ... ๐"):
app.py+10-16