Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -163,7 +163,7 @@ def main():
|
|
163 |
# Display new messages at the bottom
|
164 |
new_messages = st.session_state['chat_history'][-2:]
|
165 |
for chat in new_messages:
|
166 |
-
background_color = "#
|
167 |
new_messages_placeholder.markdown(f"<div style='background-color: {background_color}; padding: 10px; border-radius: 10px; margin: 10px;'>{chat[0]}: {chat[1]}</div>", unsafe_allow_html=True)
|
168 |
|
169 |
|
@@ -180,7 +180,7 @@ def main():
|
|
180 |
|
181 |
def display_chat_history(chat_history):
|
182 |
for chat in chat_history:
|
183 |
-
background_color = "#
|
184 |
st.markdown(f"<div style='background-color: {background_color}; padding: 10px; border-radius: 10px; margin: 10px;'>{chat[0]}: {chat[1]}</div>", unsafe_allow_html=True)
|
185 |
|
186 |
|
|
|
163 |
# Display new messages at the bottom
|
164 |
new_messages = st.session_state['chat_history'][-2:]
|
165 |
for chat in new_messages:
|
166 |
+
background_color = "#ffeecf" if chat[2] == "new" else "#ffeecf" if chat[0] == "User" else "#ffeecf"
|
167 |
new_messages_placeholder.markdown(f"<div style='background-color: {background_color}; padding: 10px; border-radius: 10px; margin: 10px;'>{chat[0]}: {chat[1]}</div>", unsafe_allow_html=True)
|
168 |
|
169 |
|
|
|
180 |
|
181 |
def display_chat_history(chat_history):
|
182 |
for chat in chat_history:
|
183 |
+
background_color = "#ffeecf" if chat[2] == "new" else "#ffeecf" if chat[0] == "User" else "#ffeecf"
|
184 |
st.markdown(f"<div style='background-color: {background_color}; padding: 10px; border-radius: 10px; margin: 10px;'>{chat[0]}: {chat[1]}</div>", unsafe_allow_html=True)
|
185 |
|
186 |
|