Spaces:
Sleeping
Sleeping
File size: 966 Bytes
b193f73 40e5985 |
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 |
import streamlit as st
import main
def generate_response(user_query):
response = main.prints(user_query)
return response
st.title("Chatbot for Health Suggestions ;)")
st.write("Hello! I'm your chatbot. You can ask any query to me")
conversation_history = []
while True:
# User input
user_input = st.text_input("Enter your Query:",value="food for vata people",help="Ex: Food suggestions for Vata people")
if user_input:
# Add user input to conversation history
conversation_history.append(f"You: {user_input}")
# Generate and display the chatbot's response
chatbot_response = generate_response(user_input)
conversation_history.append(f"Chatbot: {chatbot_response}")
st.write("Chatbot:", chatbot_response)
# End the conversation if the user says goodbye
if "bye" in user_input.lower():
break
st.write("Full Conversation:")
for message in conversation_history:
st.write(message) |