roshithindia commited on
Commit
b88ac17
·
1 Parent(s): ced4dc7

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -5
app.py CHANGED
@@ -11,23 +11,22 @@ def generate(inp):
11
  output = tokenizer.decode(beam_output[0],skip_special_tokens = True, clean_up_tokenization_spaces = True)
12
  return ".".join(output.split(".")[:-1]) + "."
13
 
14
- st.title("AI Chaperone 🎗️")
15
- st.write("AI Chaperone is an advanced AI assistant meticulously designed to provide unwavering support to individuals living with Alzheimer's disease.")
16
  if "messages" not in st.session_state:
17
  st.session_state.messages = []
18
  st.session_state.messages.append({
19
  'role':'assistant',
20
- 'content':"Hi! I'm your virtual assistant you can ask any query to me"
21
  })
22
  for message in st.session_state.messages:
23
  with st.chat_message(message["role"]):
24
  st.markdown(message["content"])
25
- prompt = st.chat_input("What is up?")
26
  if prompt:
27
  with st.chat_message("user"):
28
  st.markdown(prompt)
29
  st.session_state.messages.append({"role":"user","content":prompt})
30
- response = f"ChatBot: {generate(prompt)}"
31
  with st.chat_message("assistant"):
32
  st.markdown(response)
33
  st.session_state.messages.append({"role":"assistant","content":response})
 
11
  output = tokenizer.decode(beam_output[0],skip_special_tokens = True, clean_up_tokenization_spaces = True)
12
  return ".".join(output.split(".")[:-1]) + "."
13
 
14
+ st.title("Programming Bot")
 
15
  if "messages" not in st.session_state:
16
  st.session_state.messages = []
17
  st.session_state.messages.append({
18
  'role':'assistant',
19
+ 'content':"Hi! I'm your Programming Bot assistant"
20
  })
21
  for message in st.session_state.messages:
22
  with st.chat_message(message["role"]):
23
  st.markdown(message["content"])
24
+ prompt = st.chat_input("Any Queries?")
25
  if prompt:
26
  with st.chat_message("user"):
27
  st.markdown(prompt)
28
  st.session_state.messages.append({"role":"user","content":prompt})
29
+ response = generate(prompt)
30
  with st.chat_message("assistant"):
31
  st.markdown(response)
32
  st.session_state.messages.append({"role":"assistant","content":response})