NursNurs commited on
Commit
d953687
1 Parent(s): bffec68

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -4
app.py CHANGED
@@ -116,14 +116,13 @@ def write_bot(input, remember=True, blink=True):
116
  st.session_state.messages.append({'role': 'assistant', 'content': full_response})
117
 
118
  def ask_if_helped():
119
- if st.session_state.is_helpful['ask'] == True:
120
  y = st.button('Yes!', key=60)
121
  n = st.button('No...', key=61)
122
  if y:
123
  write_bot("I am happy to help!")
124
  elif n:
125
  st.session_state.actions.append('cue')
126
- st.session_state.is_helpful['ask'] = False
127
 
128
  if st.session_state.actions[-1] == "result":
129
  a1 = st.button('Results', key=10)
@@ -140,8 +139,8 @@ if st.session_state.actions[-1] == "result":
140
  write_bot('Does it help you remember the word?', remember=False)
141
  st.session_state.is_helpful['ask'] = True
142
 
143
-
144
- ask_if_helped()
145
 
146
 
147
  if st.session_state.actions[-1] == 'cue':
 
116
  st.session_state.messages.append({'role': 'assistant', 'content': full_response})
117
 
118
  def ask_if_helped():
 
119
  y = st.button('Yes!', key=60)
120
  n = st.button('No...', key=61)
121
  if y:
122
  write_bot("I am happy to help!")
123
  elif n:
124
  st.session_state.actions.append('cue')
125
+ st.session_state.is_helpful['ask'] = False
126
 
127
  if st.session_state.actions[-1] == "result":
128
  a1 = st.button('Results', key=10)
 
139
  write_bot('Does it help you remember the word?', remember=False)
140
  st.session_state.is_helpful['ask'] = True
141
 
142
+ if st.session_state.is_helpful['ask'] == True:
143
+ ask_if_helped()
144
 
145
 
146
  if st.session_state.actions[-1] == 'cue':