Spaces:
Runtime error
Runtime error
Commit ·
b88ac17
1
Parent(s): ced4dc7
Update app.py
Browse files10 unmodified lines111213141516171819202122232425262728293031323310 unmodified linesoutput = tokenizer.decode(beam_output[0],skip_special_tokens = True, clean_up_tokenization_spaces = True)return ".".join(output.split(".")[:-1]) + "."st.title("AI Chaperone 🎗️")st.write("AI Chaperone is an advanced AI assistant meticulously designed to provide unwavering support to individuals living with Alzheimer's disease.")if "messages" not in st.session_state:st.session_state.messages = []st.session_state.messages.append({'role':'assistant','content':"Hi! I'm your virtual assistant you can ask any query to me"})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: {generate(prompt)}"with st.chat_message("assistant"):st.markdown(response)st.session_state.messages.append({"role":"assistant","content":response})10 unmodified lines1112131415161718192021222324252627282930313210 unmodified linesoutput = tokenizer.decode(beam_output[0],skip_special_tokens = True, clean_up_tokenization_spaces = True)return ".".join(output.split(".")[:-1]) + "."st.title("Programming Bot")if "messages" not in st.session_state:st.session_state.messages = []st.session_state.messages.append({'role':'assistant','content':"Hi! I'm your Programming Bot assistant"})for message in st.session_state.messages:with st.chat_message(message["role"]):st.markdown(message["content"])prompt = st.chat_input("Any Queries?")if prompt:with st.chat_message("user"):st.markdown(prompt)st.session_state.messages.append({"role":"user","content":prompt})response = generate(prompt)with st.chat_message("assistant"):st.markdown(response)st.session_state.messages.append({"role":"assistant","content":response})
app.py+4-5