Spaces:
Sleeping
Sleeping
Fernando Knüttel commited on
Commit ·
e8a67e7
1
Parent(s): 0ed8207
correcting the path for the avatar
Browse files- src/streamlit_app.py +3 -2
src/streamlit_app.py
CHANGED
|
@@ -101,6 +101,7 @@ if not st.session_state.splash_done:
|
|
| 101 |
else:
|
| 102 |
|
| 103 |
st.set_page_config(page_title="A different kind of application", layout="centered")
|
|
|
|
| 104 |
|
| 105 |
if "history" not in st.session_state:
|
| 106 |
st.session_state.history = []
|
|
@@ -140,7 +141,7 @@ else:
|
|
| 140 |
for dic in st.session_state.history:
|
| 141 |
with st.chat_message("user"):
|
| 142 |
st.markdown(dic["q"])
|
| 143 |
-
with st.chat_message("assistant", avatar=
|
| 144 |
st.markdown(dic["a"])
|
| 145 |
|
| 146 |
|
|
@@ -190,7 +191,7 @@ else:
|
|
| 190 |
with st.chat_message("user"):
|
| 191 |
st.markdown(user_input)
|
| 192 |
|
| 193 |
-
with st.chat_message("assistant", avatar=
|
| 194 |
placeholder = st.empty()
|
| 195 |
try:
|
| 196 |
# Request to backend
|
|
|
|
| 101 |
else:
|
| 102 |
|
| 103 |
st.set_page_config(page_title="A different kind of application", layout="centered")
|
| 104 |
+
avatar_path = os.path.join(BASE_DIR, "img", "fernando.png")
|
| 105 |
|
| 106 |
if "history" not in st.session_state:
|
| 107 |
st.session_state.history = []
|
|
|
|
| 141 |
for dic in st.session_state.history:
|
| 142 |
with st.chat_message("user"):
|
| 143 |
st.markdown(dic["q"])
|
| 144 |
+
with st.chat_message("assistant", avatar=avatar_path):
|
| 145 |
st.markdown(dic["a"])
|
| 146 |
|
| 147 |
|
|
|
|
| 191 |
with st.chat_message("user"):
|
| 192 |
st.markdown(user_input)
|
| 193 |
|
| 194 |
+
with st.chat_message("assistant", avatar=avatar_path):
|
| 195 |
placeholder = st.empty()
|
| 196 |
try:
|
| 197 |
# Request to backend
|