Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -6,19 +6,6 @@ st.title("Echo Bot")
|
|
6 |
# Initialize chat history
|
7 |
if "messages" not in st.session_state:
|
8 |
st.session_state.messages = []
|
9 |
-
|
10 |
-
# Display chat messages from history on app rerun
|
11 |
-
for message in st.session_state.messages:
|
12 |
-
with st.chat_message(message["role"]):
|
13 |
-
st.markdown(message["content"])
|
14 |
-
|
15 |
-
# React to user input
|
16 |
-
if prompt := st.chat_input("What is up?"):
|
17 |
-
# Display user message in chat message container
|
18 |
-
with st.chat_message("user"):
|
19 |
-
st.markdown(prompt)
|
20 |
-
|
21 |
-
st.session_state.messages.append({"role": "user", "content": prompt})
|
22 |
|
23 |
default_chat_input_value = "Default Value"
|
24 |
js = f"""
|
|
|
6 |
# Initialize chat history
|
7 |
if "messages" not in st.session_state:
|
8 |
st.session_state.messages = []
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
9 |
|
10 |
default_chat_input_value = "Default Value"
|
11 |
js = f"""
|