Spaces:
Sleeping
Sleeping
Added my avatar
Browse files
pages/1_Descriptive_chatbot.py
CHANGED
@@ -239,7 +239,7 @@ if 'descriptions' not in st.session_state:
|
|
239 |
st.title("You name it! 🗣")
|
240 |
|
241 |
# JS: would remove Simon by some neutral avatar
|
242 |
-
with st.chat_message('user'):
|
243 |
st.write("Hey assistant!")
|
244 |
|
245 |
bot = st.chat_message('assistant')
|
@@ -248,7 +248,7 @@ bot.write("Hello human! Wanna practice naming some words?")
|
|
248 |
#for showing history of messages
|
249 |
for message in st.session_state.messages:
|
250 |
if message['role'] == 'user':
|
251 |
-
with st.chat_message(message['role']):
|
252 |
st.markdown(message['content'])
|
253 |
else:
|
254 |
with st.chat_message(message['role']):
|
@@ -258,7 +258,7 @@ for message in st.session_state.messages:
|
|
258 |
prompt = get_text()
|
259 |
if prompt:
|
260 |
#JS: would replace Simon by some neutral character
|
261 |
-
with st.chat_message('user'):
|
262 |
st.markdown(prompt)
|
263 |
#add to history
|
264 |
st.session_state.messages.append({'role': 'user', 'content': prompt})
|
|
|
239 |
st.title("You name it! 🗣")
|
240 |
|
241 |
# JS: would remove Simon by some neutral avatar
|
242 |
+
with st.chat_message('user', avatar='nursulu.jpg'):
|
243 |
st.write("Hey assistant!")
|
244 |
|
245 |
bot = st.chat_message('assistant')
|
|
|
248 |
#for showing history of messages
|
249 |
for message in st.session_state.messages:
|
250 |
if message['role'] == 'user':
|
251 |
+
with st.chat_message(message['role'], avatar='nursulu.jpg'):
|
252 |
st.markdown(message['content'])
|
253 |
else:
|
254 |
with st.chat_message(message['role']):
|
|
|
258 |
prompt = get_text()
|
259 |
if prompt:
|
260 |
#JS: would replace Simon by some neutral character
|
261 |
+
with st.chat_message('user', avatar='nursulu.jpg'):
|
262 |
st.markdown(prompt)
|
263 |
#add to history
|
264 |
st.session_state.messages.append({'role': 'user', 'content': prompt})
|