Балаганский Никита Николаевич
commited on
Commit
•
c641c56
1
Parent(s):
b08c0fd
fix
Browse files
app.py
CHANGED
@@ -34,13 +34,13 @@ def main():
|
|
34 |
cls_model_config = AutoConfig.from_pretrained(cls_model_name)
|
35 |
if cls_model_config.problem_type == "multi_label_classification":
|
36 |
label2id = cls_model_config.label2id
|
37 |
-
|
38 |
-
label_key = st.selectbox("Веберите нужный атрибут текста", list(label2id.keys())[-1])
|
39 |
target_label_id = label2id[label_key]
|
40 |
else:
|
41 |
label2id = cls_model_config.label2id
|
42 |
-
|
43 |
-
|
|
|
44 |
prompt = st.text_input("Начало текста:", "Привет")
|
45 |
alpha = st.slider("Alpha:", min_value=-10, max_value=10, step=1, value=0)
|
46 |
entropy_threshold = st.slider("Entropy Threshold:", min_value=0., max_value=5., step=.1, value=0.)
|
|
|
34 |
cls_model_config = AutoConfig.from_pretrained(cls_model_name)
|
35 |
if cls_model_config.problem_type == "multi_label_classification":
|
36 |
label2id = cls_model_config.label2id
|
37 |
+
label_key = st.selectbox("Веберите нужный атрибут текста", label2id.keys())
|
|
|
38 |
target_label_id = label2id[label_key]
|
39 |
else:
|
40 |
label2id = cls_model_config.label2id
|
41 |
+
print(list(label2id.keys()))
|
42 |
+
label_key = st.selectbox("Веберите нужный атрибут текста", [list(label2id.keys())[-1]])
|
43 |
+
target_label_id = 1
|
44 |
prompt = st.text_input("Начало текста:", "Привет")
|
45 |
alpha = st.slider("Alpha:", min_value=-10, max_value=10, step=1, value=0)
|
46 |
entropy_threshold = st.slider("Entropy Threshold:", min_value=0., max_value=5., step=.1, value=0.)
|