File size: 2,680 Bytes
249a203
 
1d7f5d1
f081c52
a988038
f081c52
 
 
 
 
 
 
 
 
 
 
 
a988038
f081c52
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
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})