Spaces:
Sleeping
Sleeping
WN bug fix
Browse files
app.py
CHANGED
@@ -198,10 +198,11 @@ if st.session_state.actions[-1] == 'cue':
|
|
198 |
target = st.session_state.results["results"][word_count]
|
199 |
if get_available_cues(target):
|
200 |
avail_cues = get_available_cues(target)
|
201 |
-
cues_buttons =
|
202 |
for cue_type, cues in avail_cues.items():
|
203 |
-
st.button(cue_type)
|
204 |
-
|
|
|
205 |
b3 = st.button("All words", key="3")
|
206 |
b4 = st.button("I remembered the word!", key="4", type='primary')
|
207 |
b5 = st.button("Exit", key="5", type='primary')
|
@@ -219,16 +220,16 @@ if st.session_state.actions[-1] == 'cue':
|
|
219 |
word_count = st.session_state.counters["word_count"]
|
220 |
write_bot(f'The next word starts with {st.session_state.results["results"][word_count][:letter_count]}', remember=False)
|
221 |
|
222 |
-
elif
|
223 |
write_bot(f'Here are synonyms for the current word: {avail_cues["Synonyms"]}', remember=False)
|
224 |
|
225 |
-
elif
|
226 |
write_bot(f'Here are hypernyms for the current word: {avail_cues["Hypernyms"]}', remember=False)
|
227 |
|
228 |
-
elif
|
229 |
write_bot(f'Here are hyponyms for the current word: {avail_cues["Hyponyms"]}', remember=False)
|
230 |
|
231 |
-
elif
|
232 |
write_bot(f'Here are example contexts for the current word: {avail_cues["Examples"]}', remember=False)
|
233 |
|
234 |
elif b3:
|
|
|
198 |
target = st.session_state.results["results"][word_count]
|
199 |
if get_available_cues(target):
|
200 |
avail_cues = get_available_cues(target)
|
201 |
+
cues_buttons = {}
|
202 |
for cue_type, cues in avail_cues.items():
|
203 |
+
#st.button(cue_type)
|
204 |
+
cues_buttons[cue_type] = st.button(cue_type)
|
205 |
+
|
206 |
b3 = st.button("All words", key="3")
|
207 |
b4 = st.button("I remembered the word!", key="4", type='primary')
|
208 |
b5 = st.button("Exit", key="5", type='primary')
|
|
|
220 |
word_count = st.session_state.counters["word_count"]
|
221 |
write_bot(f'The next word starts with {st.session_state.results["results"][word_count][:letter_count]}', remember=False)
|
222 |
|
223 |
+
elif cues_buttons['Synonyms']:
|
224 |
write_bot(f'Here are synonyms for the current word: {avail_cues["Synonyms"]}', remember=False)
|
225 |
|
226 |
+
elif cues_buttons['Hypernyms']:
|
227 |
write_bot(f'Here are hypernyms for the current word: {avail_cues["Hypernyms"]}', remember=False)
|
228 |
|
229 |
+
elif cues_buttons['Hyponyms']:
|
230 |
write_bot(f'Here are hyponyms for the current word: {avail_cues["Hyponyms"]}', remember=False)
|
231 |
|
232 |
+
elif cues_buttons['Examples']:
|
233 |
write_bot(f'Here are example contexts for the current word: {avail_cues["Examples"]}', remember=False)
|
234 |
|
235 |
elif b3:
|