Echo bot
This commit is contained in:
parent
4b43b43b55
commit
86f8adb104
11
app.py
11
app.py
@ -1,3 +1,12 @@
|
|||||||
import streamlit as st
|
import streamlit as st
|
||||||
|
|
||||||
st.write("Hello World")
|
st.title("Echo Bot")
|
||||||
|
|
||||||
|
# Initialize chat history
|
||||||
|
if "messages" not in st.session_state:
|
||||||
|
st.session_state.messages = []
|
||||||
|
|
||||||
|
# Display chat messages from history on app rerun
|
||||||
|
for message in st.session_state.messages:
|
||||||
|
with st.chat_message(message["role"]):
|
||||||
|
st.markdown(message["content"])
|
||||||
|
Loading…
Reference in New Issue
Block a user