Esempio n. 1
0
def sidebar(sender):
    from saai.saai_bot_cli import SaaiBotCli

    cur_lang=display_lang_selector()
    opt=st.sidebar.selectbox('Functions', ['nlu parse', 'bot talk'])
    if st.sidebar.button("reset conversation"):
        SaaiBotCli().reset_conversation(sender=sender)
    return cur_lang, opt
Esempio n. 2
0
def main():
    header = st.header("Word Mappings")
    cur_lang = display_lang_selector()

    app_mode = st.sidebar.selectbox("Choose the app mode", [
        "Word mappings",
        "Sentence parser",
    ])
    header.header(app_mode)
    if app_mode == "Word mappings":
        # st.sidebar.success('To continue select "Run the app".')
        text = st.text_input("Word to analyze", 'ship')
        display_chains(text, cur_lang)
    elif app_mode == "Sentence parser":
        sentence_part(cur_lang)
Esempio n. 3
0
def sidebar():
    cur_lang = display_lang_selector()
Esempio n. 4
0
def sidebar():
    cur_lang=display_lang_selector()
    use_textarea=st.sidebar.checkbox('Use textarea', value=True)
    exec_as_function=st.sidebar.checkbox('Execute as function', value=True)
    return cur_lang, use_textarea, exec_as_function