schlenker commited on
Commit
04d85db
·
1 Parent(s): 54faac5

remember fix

Browse files
Files changed (1) hide show
  1. pages/1_Descriptive_chatbot.py +18 -17
pages/1_Descriptive_chatbot.py CHANGED
@@ -299,23 +299,6 @@ if st.session_state.actions[-1] == "result":
299
  #write_bot('Does it help you remember the word?', remember=False)
300
  #st.session_state.is_helpful['ask'] = True
301
 
302
- if st.session_state.is_helpful['ask']:
303
- y = st.button('Yes!', key=60)
304
- n = st.button('No...', key=61)
305
- new = st.button('I have a new word', key=62)
306
- if y:
307
- write_bot("I am happy to help!")
308
- again = st.button('Play again')
309
- if again:
310
- write_bot("Please describe your word!")
311
- st.session_state.is_helpful['ask'] = False
312
- elif n:
313
- st.session_state.actions.append('cue')
314
- st.session_state.is_helpful['ask'] = False
315
- #cue_generation()
316
- elif new:
317
- write_bot("Please describe your word!")
318
- st.session_state.is_helpful['ask'] = False
319
 
320
  if st.session_state.actions[-1] == 'cue':
321
  guessed = False
@@ -420,3 +403,21 @@ if st.session_state.actions[-1] == 'cue':
420
 
421
  break
422
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
299
  #write_bot('Does it help you remember the word?', remember=False)
300
  #st.session_state.is_helpful['ask'] = True
301
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
302
 
303
  if st.session_state.actions[-1] == 'cue':
304
  guessed = False
 
403
 
404
  break
405
 
406
+ if st.session_state.is_helpful['ask']:
407
+ y = st.button('Yes!', key=60)
408
+ n = st.button('No...', key=61)
409
+ new = st.button('I have a new word', key=62)
410
+ if y:
411
+ write_bot("I am happy to help!")
412
+ again = st.button('Play again')
413
+ if again:
414
+ write_bot("Please describe your word!")
415
+ st.session_state.is_helpful['ask'] = False
416
+ elif n:
417
+ st.session_state.actions.append('cue')
418
+ st.session_state.is_helpful['ask'] = False
419
+ #cue_generation()
420
+ elif new:
421
+ write_bot("Please describe your word!")
422
+ st.session_state.is_helpful['ask'] = False
423
+