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 Prakruti:smile:") | |
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 Prakruti is: {Output}") | |
# if "messages" not in st.session_state: | |
# st.session_state.messages = [] | |
# for message in st.session_state.messages: | |
# with st.chat_message(message["role"]): | |
# st.markdown(message["content"]) | |
# prompt = st.chat_input("What is up?") | |
# if prompt: | |
# with st.chat_message("user"): | |
# st.markdown(prompt) | |
# st.session_state.messages.append({"role":"user","content":prompt}) | |
# response = f"ChatBot: {main.prints(prompt)}" | |
# with st.chat_message("assistant"): | |
# st.markdown(response) | |
# st.session_state.messages.append({"role":"assistant","content":response}) |