add trust remote code
#5
by
ZeroCommand
- opened
- fetch_utils.py +1 -1
- text_classification_ui_helpers.py +1 -1
fetch_utils.py
CHANGED
|
@@ -5,7 +5,7 @@ import datasets
|
|
| 5 |
|
| 6 |
def check_dataset_and_get_config(dataset_id):
|
| 7 |
try:
|
| 8 |
-
configs = datasets.get_dataset_config_names(dataset_id)
|
| 9 |
return configs
|
| 10 |
except Exception:
|
| 11 |
# Dataset may not exist
|
|
|
|
| 5 |
|
| 6 |
def check_dataset_and_get_config(dataset_id):
|
| 7 |
try:
|
| 8 |
+
configs = datasets.get_dataset_config_names(dataset_id, trust_remote_code=True)
|
| 9 |
return configs
|
| 10 |
except Exception:
|
| 11 |
# Dataset may not exist
|
text_classification_ui_helpers.py
CHANGED
|
@@ -52,7 +52,7 @@ logger = logging.getLogger(__file__)
|
|
| 52 |
def check_dataset(dataset_id):
|
| 53 |
logger.info(f"Loading {dataset_id}")
|
| 54 |
try:
|
| 55 |
-
configs = datasets.get_dataset_config_names(dataset_id)
|
| 56 |
if len(configs) == 0:
|
| 57 |
return (
|
| 58 |
gr.update(),
|
|
|
|
| 52 |
def check_dataset(dataset_id):
|
| 53 |
logger.info(f"Loading {dataset_id}")
|
| 54 |
try:
|
| 55 |
+
configs = datasets.get_dataset_config_names(dataset_id, trust_remote_code=True)
|
| 56 |
if len(configs) == 0:
|
| 57 |
return (
|
| 58 |
gr.update(),
|