Spaces:
Sleeping
Sleeping
togokah
commited on
Commit
•
f04645e
1
Parent(s):
27025bf
Upd (lower, def to 4 distr-s)
Browse files
pages/2_👨🏫_Начало_работы.py
CHANGED
@@ -141,7 +141,7 @@ if st.session_state.get('-LOGGED_IN_BOOL-'):
|
|
141 |
label='**Выберите количество дистракторов в задании:**',
|
142 |
min_value=1,
|
143 |
max_value=9,
|
144 |
-
value=
|
145 |
key='-NUM_DISTRACTORS-')
|
146 |
TARGET_WORDS = UTW_COL.text_area(
|
147 |
label='**Если "Самостоятельно", введите целевые слова:**',
|
@@ -214,8 +214,7 @@ if st.session_state.get('-LOGGED_IN_BOOL-'):
|
|
214 |
tw_mode_automatic_mode=TARGET_WORDS_MODE,
|
215 |
target_words=TARGET_WORDS,
|
216 |
num_distractors=NUMBER_DISTRACTORS,
|
217 |
-
save_name=USER__SAVE_IN_CLOUD_FILE_NAME
|
218 |
-
distractor_model=DISTRACTOR_MODEL)
|
219 |
|
220 |
# In order to bypass further
|
221 |
USER__SAVE_IN_CLOUD_FILE_NAME = USER__SAVE_IN_CLOUD_FILE_NAME if USER__SAVE_IN_CLOUD_FILE_NAME != '' \
|
|
|
141 |
label='**Выберите количество дистракторов в задании:**',
|
142 |
min_value=1,
|
143 |
max_value=9,
|
144 |
+
value=4,
|
145 |
key='-NUM_DISTRACTORS-')
|
146 |
TARGET_WORDS = UTW_COL.text_area(
|
147 |
label='**Если "Самостоятельно", введите целевые слова:**',
|
|
|
214 |
tw_mode_automatic_mode=TARGET_WORDS_MODE,
|
215 |
target_words=TARGET_WORDS,
|
216 |
num_distractors=NUMBER_DISTRACTORS,
|
217 |
+
save_name=USER__SAVE_IN_CLOUD_FILE_NAME)
|
|
|
218 |
|
219 |
# In order to bypass further
|
220 |
USER__SAVE_IN_CLOUD_FILE_NAME = USER__SAVE_IN_CLOUD_FILE_NAME if USER__SAVE_IN_CLOUD_FILE_NAME != '' \
|
utilities_language_bert/esp_sentence_bert.py
CHANGED
@@ -250,6 +250,6 @@ class TASK:
|
|
250 |
distractors = sample(self.inflected_distractors, len_variants) + [self.original_text, ]
|
251 |
except ValueError:
|
252 |
distractors = self.inflected_distractors + [self.original_text, ]
|
253 |
-
tmp_vars = [f'{item[0]} {item[1].replace("_", " ")}'
|
254 |
for item in zip(letters, sorted(distractors, key=lambda _: random()))]
|
255 |
self.variants.append((self.original_text, tmp_vars))
|
|
|
250 |
distractors = sample(self.inflected_distractors, len_variants) + [self.original_text, ]
|
251 |
except ValueError:
|
252 |
distractors = self.inflected_distractors + [self.original_text, ]
|
253 |
+
tmp_vars = [f'{item[0]} {item[1].replace("_", " ")}'.lower()
|
254 |
for item in zip(letters, sorted(distractors, key=lambda _: random()))]
|
255 |
self.variants.append((self.original_text, tmp_vars))
|