Spaces:
Sleeping
Sleeping
trynna fix the remember word -yes/no bug again
Browse files- pages/2_Context-based_chatbot.py +19 -21
pages/2_Context-based_chatbot.py
CHANGED
@@ -261,32 +261,30 @@ if st.session_state.is_helpful_context['ask'] == True:
|
|
261 |
if st.session_state.actions_context[-1] == 'cue':
|
262 |
guessed = False
|
263 |
write_bot('What do you want to see?', remember=False, blink=False)
|
|
|
|
|
264 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
265 |
while guessed == False:
|
266 |
# JS
|
267 |
word_count = st.session_state.counter_context["word_count"]
|
268 |
target = st.session_state.results_context["results_context"][word_count]
|
269 |
-
|
270 |
-
col1, col2, col3, col4, col5 = st.columns(5)
|
271 |
-
|
272 |
-
|
273 |
-
with col1:
|
274 |
-
b1 = st.button("Next letter", key="1")
|
275 |
-
with col2:
|
276 |
-
b2 = st.button("Related words")
|
277 |
-
with col3:
|
278 |
-
b3 = st.button("Next word", key="2")
|
279 |
-
with col4:
|
280 |
-
b4 = st.button("All words", key="3")
|
281 |
-
|
282 |
-
# JS
|
283 |
-
#if get_available_cues(target):
|
284 |
-
# avail_cues = get_available_cues(target)
|
285 |
-
#cues_buttons = {cue_type: st.button(cue_type) for cue_type in avail_cues}
|
286 |
-
|
287 |
-
b5 = st.button("I remembered the word!", key="4", type='primary')
|
288 |
-
b6 = st.button("Exit", key="5", type='primary')
|
289 |
-
new = st.button('Play again', key=64, type='primary')
|
290 |
|
291 |
if b1:
|
292 |
st.session_state.counter_context["letter_count"] += 1
|
|
|
261 |
if st.session_state.actions_context[-1] == 'cue':
|
262 |
guessed = False
|
263 |
write_bot('What do you want to see?', remember=False, blink=False)
|
264 |
+
col1, col2, col3, col4, col5 = st.columns(5)
|
265 |
+
|
266 |
|
267 |
+
with col1:
|
268 |
+
b1 = st.button("Next letter", key="1")
|
269 |
+
with col2:
|
270 |
+
b2 = st.button("Related words")
|
271 |
+
with col3:
|
272 |
+
b3 = st.button("Next word", key="2")
|
273 |
+
with col4:
|
274 |
+
b4 = st.button("All words", key="3")
|
275 |
+
|
276 |
+
# JS
|
277 |
+
#if get_available_cues(target):
|
278 |
+
# avail_cues = get_available_cues(target)
|
279 |
+
#cues_buttons = {cue_type: st.button(cue_type) for cue_type in avail_cues}
|
280 |
+
|
281 |
+
b5 = st.button("I remembered the word!", key="4", type='primary')
|
282 |
+
b6 = st.button("Exit", key="5", type='primary')
|
283 |
+
new = st.button('Play again', key=64, type='primary')
|
284 |
while guessed == False:
|
285 |
# JS
|
286 |
word_count = st.session_state.counter_context["word_count"]
|
287 |
target = st.session_state.results_context["results_context"][word_count]
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
288 |
|
289 |
if b1:
|
290 |
st.session_state.counter_context["letter_count"] += 1
|