Spaces:
Sleeping
Sleeping
John Graham Reynolds
commited on
Commit
·
70e033b
1
Parent(s):
110e7e0
update feedback list in session_state
Browse files
app.py
CHANGED
@@ -244,8 +244,8 @@ def feedback():
|
|
244 |
|
245 |
main = st.container()
|
246 |
with main:
|
247 |
-
if st.session_state["feedback"][-1] is not None:
|
248 |
-
|
249 |
history = st.container(height=400)
|
250 |
with history:
|
251 |
for message in st.session_state["messages"]:
|
@@ -268,9 +268,11 @@ with main:
|
|
268 |
st.markdown("\n") #add some space for iphone users
|
269 |
# with st.container():
|
270 |
gave_feedback = st.button('Give Feedback on Last Response', on_click=feedback)
|
271 |
-
if gave_feedback:
|
272 |
-
st.session_state["feedback"].append("given")
|
273 |
-
|
|
|
|
|
274 |
# time.sleep(3)
|
275 |
# add st.session_state["feedback"] var for keeping track of when the user gives feedback!
|
276 |
|
|
|
244 |
|
245 |
main = st.container()
|
246 |
with main:
|
247 |
+
if st.session_state["feedback"][-1] is not None: # TODO clean this up in a fn?
|
248 |
+
st.markdown("Feedback received! Thank you for your insight.")
|
249 |
history = st.container(height=400)
|
250 |
with history:
|
251 |
for message in st.session_state["messages"]:
|
|
|
268 |
st.markdown("\n") #add some space for iphone users
|
269 |
# with st.container():
|
270 |
gave_feedback = st.button('Give Feedback on Last Response', on_click=feedback)
|
271 |
+
if gave_feedback: # TODO clean up the conditions here with a function
|
272 |
+
st.session_state["feedback"].append("given")
|
273 |
+
else:
|
274 |
+
st.session_state["feedback"].append(None)
|
275 |
+
# st.markdown("Feedback received! Thank you for your insight.")
|
276 |
# time.sleep(3)
|
277 |
# add st.session_state["feedback"] var for keeping track of when the user gives feedback!
|
278 |
|