Rohankumar31 commited on
Commit
e0c3467
1 Parent(s): 49b5944

Delete stream.py

Browse files
Files changed (1) hide show
  1. stream.py +0 -47
stream.py DELETED
@@ -1,47 +0,0 @@
1
- import streamlit as st
2
- import main
3
- st.title("Chatbot for Health Suggestions ;)")
4
- st.write("Hello! I'm your chatbot. You can ask any query to me")
5
- if "messages" not in st.session_state:
6
- st.session_state.messages = []
7
- for message in st.session_state.messages:
8
- with st.chat_message(message["role"]):
9
- st.markdown(message["content"])
10
- prompt = st.chat_input("What is up?")
11
- if prompt:
12
- with st.chat_message("user"):
13
- st.markdown(prompt)
14
- st.session_state.messages.append({"role":"user","content":prompt})
15
- response = f"ChatBot: {main.prints(prompt)}"
16
- with st.chat_message("assistant"):
17
- st.markdown(response)
18
- st.session_state.messages.append({"role":"assistant","content":response})
19
- # import streamlit as st
20
- # import main
21
- # def generate_response(user_query):
22
- # response = main.prints(user_query)
23
- # return response
24
- # st.title("Chatbot for Health Suggestions ;)")
25
- # st.write("Hello! I'm your chatbot. You can ask any query to me")
26
- # conversation_history = []
27
- # Query_no = 0
28
- # while True:
29
- # # User input
30
- # user_input = st.text_input(f"Enter your Query{Query_no}:",help="Ex: Food suggestions for Vata people")
31
-
32
- # if st.button("Process"):
33
- # # Add user input to conversation history
34
- # conversation_history.append(f"You: {user_input}")
35
-
36
- # # Generate and display the chatbot's response
37
- # chatbot_response = generate_response(user_input)
38
- # conversation_history.append(f"Chatbot: {chatbot_response}")
39
- # st.write("Chatbot:", chatbot_response)
40
-
41
- # # End the conversation if the user says goodbye
42
- # if "bye" in user_input.lower():
43
- # break
44
- # Query_no += 1
45
- # st.write("Full Conversation:")
46
- # for message in conversation_history:
47
- # st.write(message)