Балаганский Никита Николаевич
commited on
Commit
•
b08c0fd
1
Parent(s):
2048e13
fix
Browse files
app.py
CHANGED
@@ -34,7 +34,8 @@ 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 |
target_label_id = label2id[label_key]
|
39 |
else:
|
40 |
label2id = cls_model_config.label2id
|
|
|
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 |
+
print(list(label2id.keys()))
|
38 |
+
label_key = st.selectbox("Веберите нужный атрибут текста", list(label2id.keys())[-1])
|
39 |
target_label_id = label2id[label_key]
|
40 |
else:
|
41 |
label2id = cls_model_config.label2id
|