Spaces:
Sleeping
Sleeping
| import streamlit as st | |
| from main_2 import input_output | |
| from model_2 import classes,unique_output | |
| import pandas as pd | |
| st.title("Chatbot to know Your Prakriti π") | |
| st.write("Hello! I'm your chatbot. You can ask any query to me") | |
| Questions = [] | |
| Q = [] | |
| for i in range(18): | |
| st.write(f"What is Your {classes[i]}?") | |
| options = unique_output[i] | |
| selected_option = st.selectbox(f"Choose your answer:",options) | |
| Q.append(selected_option) | |
| Questions.append(Q) | |
| Questions = pd.DataFrame(Questions) | |
| if st.button("Process"): | |
| Output = input_output(Questions) | |
| st.write(f"Your Prakriti is: {Output}") | |
| # import streamlit as st | |
| # from main_2 import input_output | |
| # import pandas as pd | |
| # from model_2 import classes,unique_output | |
| # st.title("Chatbot to know Your Prakruti π") | |
| # st.write("Prakruti, in Ayurveda, refers to an individual's unique physical and psychological constitution. It is determined by the balance of three fundamental energies or doshas: Vata, Pitta, and Kapha. Understanding one's Prakruti helps tailor health and lifestyle choices for overall well-being.") | |
| # if "messages" not in st.session_state: | |
| # st.session_state.messages = [] | |
| # st.session_state.messages.append({ | |
| # 'role':'assistant', | |
| # 'content':"Hi! I'm your virtual assistant. If you need to know your Prakruti enter 'Yes'" | |
| # }) | |
| # for message in st.session_state.messages: | |
| # with st.chat_message(message["role"]): | |
| # st.markdown(message["content"]) | |
| # prompt = st.chat_input() | |
| # if prompt: | |
| # # with st.chat_message("user"): | |
| # # st.markdown(prompt) | |
| # # st.session_state.messages.append({"role":"user","content":prompt}) | |
| # # response = f"ChatBot: {input_output(prompt)}" | |
| # # with st.chat_message("assistant"): | |
| # # st.markdown(response) | |
| # # st.session_state.messages.append({"role":"assistant","content":response}) | |
| # Questions = [] | |
| # Q = [] | |
| # for i in range(18): | |
| # Que = f"What is Your {classes[i]}?" | |
| # with st.chat_message("assistant"): | |
| # st.markdown(Que) | |
| # st.session_state.messages.append({"role":"assistant","context":Que}) | |
| # options = unique_output[i] | |
| # selected_option = st.selectbox(f"Choose your answer:",options) | |
| # Q.append(selected_option) | |
| # with st.chat_message("user"): | |
| # st.markdown(selected_option) | |
| # st.session_state.messages.append({"role":"user","context":selected_option}) | |
| # Questions.append(Q) | |
| # Questions = pd.DataFrame(Questions) | |
| # output = input_output(Questions) | |
| # with st.chat_message("assistant"): | |
| # st.markdown(output) | |
| # st.session_state.messages.append({"role":"assistant","context":output}) |