Spaces:
Sleeping
Sleeping
вудуеув ыщьу йгуыешщты
Browse files
pages/2_Context-based_chatbot.py
CHANGED
@@ -291,7 +291,7 @@ if st.session_state.actions_context[-1] == 'cue':
|
|
291 |
#word_count = st.session_state.counter_context["word_count"]
|
292 |
letter_count = st.session_state.counter_context["letter_count"]
|
293 |
if letter_count < len(target):
|
294 |
-
write_bot(f'The word starts with {st.session_state.results_context["results_context"][word_count][:letter_count]}.
|
295 |
#ask_if_helped_context()
|
296 |
st.session_state.is_helpful_context['ask'] = True
|
297 |
else:
|
@@ -301,7 +301,7 @@ if st.session_state.actions_context[-1] == 'cue':
|
|
301 |
|
302 |
elif b2:
|
303 |
rels = return_top_k_context(st.session_state.descriptions_context[-1], word=target, rels=True)
|
304 |
-
write_bot(f'Here are words that are related to your word: {", ".join(rels)}.
|
305 |
#ask_if_helped_context()
|
306 |
st.session_state.is_helpful_context['ask'] = True
|
307 |
|
@@ -312,7 +312,7 @@ if st.session_state.actions_context[-1] == 'cue':
|
|
312 |
word_count = st.session_state.counter_context["word_count"]
|
313 |
#write_bot(f'The next word starts with {st.session_state.results_context["results_context"][word_count][:letter_count]}', remember=False)
|
314 |
if letter_count < len(target):
|
315 |
-
write_bot(f'The next word starts with {st.session_state.results_context["results_context"][word_count][:letter_count]}.
|
316 |
#ask_if_helped_context()
|
317 |
st.session_state.is_helpful_context['ask'] = True
|
318 |
else:
|
|
|
291 |
#word_count = st.session_state.counter_context["word_count"]
|
292 |
letter_count = st.session_state.counter_context["letter_count"]
|
293 |
if letter_count < len(target):
|
294 |
+
write_bot(f'The word starts with {st.session_state.results_context["results_context"][word_count][:letter_count]}.', remember=False)
|
295 |
#ask_if_helped_context()
|
296 |
st.session_state.is_helpful_context['ask'] = True
|
297 |
else:
|
|
|
301 |
|
302 |
elif b2:
|
303 |
rels = return_top_k_context(st.session_state.descriptions_context[-1], word=target, rels=True)
|
304 |
+
write_bot(f'Here are words that are related to your word: {", ".join(rels)}.', remember=False)
|
305 |
#ask_if_helped_context()
|
306 |
st.session_state.is_helpful_context['ask'] = True
|
307 |
|
|
|
312 |
word_count = st.session_state.counter_context["word_count"]
|
313 |
#write_bot(f'The next word starts with {st.session_state.results_context["results_context"][word_count][:letter_count]}', remember=False)
|
314 |
if letter_count < len(target):
|
315 |
+
write_bot(f'The next word starts with {st.session_state.results_context["results_context"][word_count][:letter_count]}.', remember=False)
|
316 |
#ask_if_helped_context()
|
317 |
st.session_state.is_helpful_context['ask'] = True
|
318 |
else:
|