Spaces:
Running
Running
togokah
commited on
Commit
·
97b436b
1
Parent(s):
efbe6b4
Upd
Browse files
pages/2_👨🏫_Начало_работы.py
CHANGED
@@ -81,7 +81,7 @@ if st.session_state.get('-LOGGED_IN_BOOL-'):
|
|
81 |
with COL2:
|
82 |
UPLOAD_CLOUD_CEFR_LEVEL = custom_select_box(
|
83 |
'Выберите языковой уровень',
|
84 |
-
['A1', 'A2', 'B1', 'B2', 'C1', 'C2', '
|
85 |
no_selection_label='-Выберите языковой уровень-')
|
86 |
st.session_state['-UPLOAD_CLOUD_CEFR_LEVEL-'] = UPLOAD_CLOUD_CEFR_LEVEL
|
87 |
LOAD_BUTTON = LOAD_FORM.form_submit_button('Загрузить')
|
|
|
81 |
with COL2:
|
82 |
UPLOAD_CLOUD_CEFR_LEVEL = custom_select_box(
|
83 |
'Выберите языковой уровень',
|
84 |
+
['A1', 'A2', 'B1', 'B2', 'C1', 'C2', 'Без уровня'],
|
85 |
no_selection_label='-Выберите языковой уровень-')
|
86 |
st.session_state['-UPLOAD_CLOUD_CEFR_LEVEL-'] = UPLOAD_CLOUD_CEFR_LEVEL
|
87 |
LOAD_BUTTON = LOAD_FORM.form_submit_button('Загрузить')
|
utilities/utils.py
CHANGED
@@ -14,10 +14,12 @@ def points_to_mark(good, total):
|
|
14 |
|
15 |
|
16 |
def answer_letter(answer, variants):
|
|
|
17 |
for var in variants:
|
18 |
letter, var = var.split(') ')
|
19 |
if var == answer:
|
20 |
return letter + ') ' + answer
|
|
|
21 |
|
22 |
|
23 |
def is_valid_uuid(value):
|
|
|
14 |
|
15 |
|
16 |
def answer_letter(answer, variants):
|
17 |
+
print('START', answer, variants)
|
18 |
for var in variants:
|
19 |
letter, var = var.split(') ')
|
20 |
if var == answer:
|
21 |
return letter + ') ' + answer
|
22 |
+
print('ERROR', answer, variants)
|
23 |
|
24 |
|
25 |
def is_valid_uuid(value):
|
utilities_cookies/encrypted_cookie_manager.py
CHANGED
@@ -11,7 +11,7 @@ from utilities_cookies.cookie_manager import CookieManager
|
|
11 |
from cryptography.hazmat.primitives.kdf.pbkdf2 import PBKDF2HMAC
|
12 |
|
13 |
|
14 |
-
@st.
|
15 |
def key_from_parameters(salt: bytes, iterations: int, password: str):
|
16 |
kdf = PBKDF2HMAC(
|
17 |
algorithm=hashes.SHA256(),
|
|
|
11 |
from cryptography.hazmat.primitives.kdf.pbkdf2 import PBKDF2HMAC
|
12 |
|
13 |
|
14 |
+
@st.cache_data
|
15 |
def key_from_parameters(salt: bytes, iterations: int, password: str):
|
16 |
kdf = PBKDF2HMAC(
|
17 |
algorithm=hashes.SHA256(),
|
utilities_language_general/rus_utils.py
CHANGED
@@ -261,9 +261,7 @@ def get_distractors_from_model_bert(model, text_with_masked_task: str, lemma: st
|
|
261 |
_distractors = []
|
262 |
try:
|
263 |
if distractor_minimum:
|
264 |
-
bert_candidates = [token for token in model(text_with_masked_task,
|
265 |
-
top_k=max_num_distractors + 100,
|
266 |
-
targets=list(distractor_minimum))]
|
267 |
else:
|
268 |
bert_candidates = [token for token in model(text_with_masked_task, top_k=max_num_distractors + 100)]
|
269 |
inflected_candidates = []
|
|
|
261 |
_distractors = []
|
262 |
try:
|
263 |
if distractor_minimum:
|
264 |
+
bert_candidates = [token for token in model(text_with_masked_task, top_k=max_num_distractors + 100)]
|
|
|
|
|
265 |
else:
|
266 |
bert_candidates = [token for token in model(text_with_masked_task, top_k=max_num_distractors + 100)]
|
267 |
inflected_candidates = []
|