Prakruti_LLM / stream.py
Rohankumar31's picture
Update stream.py
40e5985
raw
history blame
966 Bytes
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)