Spaces:
Sleeping
Sleeping
Mr-Vicky-01
commited on
Commit
•
5b9bb83
1
Parent(s):
6fc35ba
Update app.py
Browse files
app.py
CHANGED
@@ -81,7 +81,7 @@ if 'messages' not in st.session_state:
|
|
81 |
st.session_state.messages = [{'role': 'assistant', "content": 'Hello! Upload a PDF and ask me anything about its content.'}]
|
82 |
|
83 |
for message in st.session_state.messages:
|
84 |
-
with st.chat_message(message['role'], avatar=
|
85 |
st.write(message['content'])
|
86 |
|
87 |
with st.sidebar:
|
@@ -108,7 +108,7 @@ if user_prompt and uploaded_file:
|
|
108 |
st.write(user_prompt)
|
109 |
|
110 |
if st.session_state.messages[-1]["role"] != "assistant":
|
111 |
-
with st.chat_message("assistant"):
|
112 |
response = handle_query(user_prompt)
|
113 |
full_response = st.write(response)
|
114 |
message = {"role": "assistant", "content": full_response}
|
|
|
81 |
st.session_state.messages = [{'role': 'assistant', "content": 'Hello! Upload a PDF and ask me anything about its content.'}]
|
82 |
|
83 |
for message in st.session_state.messages:
|
84 |
+
with st.chat_message(message['role'], avatar=icons[message['role']]):
|
85 |
st.write(message['content'])
|
86 |
|
87 |
with st.sidebar:
|
|
|
108 |
st.write(user_prompt)
|
109 |
|
110 |
if st.session_state.messages[-1]["role"] != "assistant":
|
111 |
+
with st.chat_message("assistant", avatar="👽"):
|
112 |
response = handle_query(user_prompt)
|
113 |
full_response = st.write(response)
|
114 |
message = {"role": "assistant", "content": full_response}
|