Update app.py
Browse files
app.py
CHANGED
|
@@ -27,18 +27,18 @@ def handle_input():
|
|
| 27 |
|
| 28 |
# Main Chat UI
|
| 29 |
st.title("DUBS v.0.0.3")
|
| 30 |
-
st.markdown("
|
| 31 |
|
| 32 |
# Chat Display
|
| 33 |
for message in st.session_state["messages"]:
|
| 34 |
if message["role"] == "user":
|
| 35 |
st.markdown(
|
| 36 |
-
f"<div style='text-align: right; color:
|
| 37 |
unsafe_allow_html=True,
|
| 38 |
)
|
| 39 |
elif message["role"] == "assistant":
|
| 40 |
st.markdown(
|
| 41 |
-
f"<div style='text-align: left; color:
|
| 42 |
unsafe_allow_html=True,
|
| 43 |
)
|
| 44 |
|
|
@@ -48,4 +48,4 @@ st.text_input(
|
|
| 48 |
placeholder="Type your message here...",
|
| 49 |
key="user_input",
|
| 50 |
on_change=handle_input,
|
| 51 |
-
)
|
|
|
|
| 27 |
|
| 28 |
# Main Chat UI
|
| 29 |
st.title("DUBS v.0.0.3")
|
| 30 |
+
st.markdown("Empowering you with a Sustainable AI")
|
| 31 |
|
| 32 |
# Chat Display
|
| 33 |
for message in st.session_state["messages"]:
|
| 34 |
if message["role"] == "user":
|
| 35 |
st.markdown(
|
| 36 |
+
f"<div style='text-align: right; background-color: #f3e5f5; color: #6a1b9a; margin: 10px 0; padding: 10px; border-radius: 10px;'><b>You:</b> {message['content']}</div>",
|
| 37 |
unsafe_allow_html=True,
|
| 38 |
)
|
| 39 |
elif message["role"] == "assistant":
|
| 40 |
st.markdown(
|
| 41 |
+
f"<div style='text-align: left; background-color: #fffde7; color: #fbc02d; margin: 10px 0; padding: 10px; border-radius: 10px;'><b>Bot:</b> {message['content']}</div>",
|
| 42 |
unsafe_allow_html=True,
|
| 43 |
)
|
| 44 |
|
|
|
|
| 48 |
placeholder="Type your message here...",
|
| 49 |
key="user_input",
|
| 50 |
on_change=handle_input,
|
| 51 |
+
)
|