add styled error
#6
by
ZeroCommand
- opened
text_classification_ui_helpers.py
CHANGED
@@ -23,7 +23,7 @@ from wordings import (
|
|
23 |
CONFIRM_MAPPING_DETAILS_FAIL_RAW,
|
24 |
MAPPING_STYLED_ERROR_WARNING,
|
25 |
NOT_TEXT_CLASSIFICATION_MODEL_RAW,
|
26 |
-
|
27 |
CHECK_LOG_SECTION_RAW,
|
28 |
get_styled_input,
|
29 |
)
|
@@ -255,9 +255,9 @@ def align_columns_and_show_prediction(
|
|
255 |
)
|
256 |
|
257 |
if len(ds_labels) != len(model_labels):
|
258 |
-
gr.Warning(UNMATCHED_MODEL_DATASET)
|
259 |
return (
|
260 |
-
gr.update(visible=
|
261 |
gr.update(visible=False),
|
262 |
gr.update(visible=False, open=False),
|
263 |
gr.update(interactive=False),
|
|
|
23 |
CONFIRM_MAPPING_DETAILS_FAIL_RAW,
|
24 |
MAPPING_STYLED_ERROR_WARNING,
|
25 |
NOT_TEXT_CLASSIFICATION_MODEL_RAW,
|
26 |
+
UNMATCHED_MODEL_DATASET_STYLED_ERROR,
|
27 |
CHECK_LOG_SECTION_RAW,
|
28 |
get_styled_input,
|
29 |
)
|
|
|
255 |
)
|
256 |
|
257 |
if len(ds_labels) != len(model_labels):
|
258 |
+
# gr.Warning(UNMATCHED_MODEL_DATASET)
|
259 |
return (
|
260 |
+
gr.update(value=UNMATCHED_MODEL_DATASET_STYLED_ERROR, visible=True),
|
261 |
gr.update(visible=False),
|
262 |
gr.update(visible=False, open=False),
|
263 |
gr.update(interactive=False),
|