Spaces:
Running
Running
inoki-giskard
commited on
Commit
•
4958a71
1
Parent(s):
d1c50ba
Early return for emprt dataset id
Browse files
text_classification_ui_helpers.py
CHANGED
@@ -73,11 +73,14 @@ def get_dataset_splits(dataset_id, dataset_config):
|
|
73 |
logger.warning(
|
74 |
f"Check your dataset {dataset_id} and config {dataset_config}: {e}"
|
75 |
)
|
76 |
-
|
77 |
|
78 |
|
79 |
def check_dataset(dataset_id):
|
80 |
logger.info(f"Loading {dataset_id}")
|
|
|
|
|
|
|
81 |
try:
|
82 |
configs = datasets.get_dataset_config_names(dataset_id, trust_remote_code=True)
|
83 |
if len(configs) == 0:
|
@@ -101,7 +104,7 @@ def check_dataset(dataset_id):
|
|
101 |
# Unknown error
|
102 |
gr.Warning(get_dataset_fetch_error_raw(e))
|
103 |
|
104 |
-
|
105 |
|
106 |
|
107 |
def empty_column_mapping(uid):
|
|
|
73 |
logger.warning(
|
74 |
f"Check your dataset {dataset_id} and config {dataset_config}: {e}"
|
75 |
)
|
76 |
+
return gr.update(visible=False)
|
77 |
|
78 |
|
79 |
def check_dataset(dataset_id):
|
80 |
logger.info(f"Loading {dataset_id}")
|
81 |
+
if not dataset_id or len(dataset_id) == 0:
|
82 |
+
return (gr.update(visible=False), gr.update(visible=False), "")
|
83 |
+
|
84 |
try:
|
85 |
configs = datasets.get_dataset_config_names(dataset_id, trust_remote_code=True)
|
86 |
if len(configs) == 0:
|
|
|
104 |
# Unknown error
|
105 |
gr.Warning(get_dataset_fetch_error_raw(e))
|
106 |
|
107 |
+
return (gr.update(visible=False), gr.update(visible=False), "")
|
108 |
|
109 |
|
110 |
def empty_column_mapping(uid):
|