Spaces:
Runtime error
Runtime error
Tweaks
Browse files
app.py
CHANGED
@@ -75,7 +75,6 @@ AUTOTRAIN_TASK_TO_LANG = {
|
|
75 |
|
76 |
|
77 |
SUPPORTED_TASKS = list(TASK_TO_ID.keys())
|
78 |
-
UNSUPPORTED_TASKS = []
|
79 |
|
80 |
# Extracted from utils.get_supported_metrics
|
81 |
# Hardcoded for now due to speed / caching constraints
|
@@ -198,7 +197,7 @@ with st.expander("Advanced configuration"):
|
|
198 |
See the [docs](https://huggingface.co/docs/datasets/master/en/load_hub#configurations) for more details.
|
199 |
""",
|
200 |
)
|
201 |
-
#
|
202 |
config_metadata = get_config_metadata(selected_config, metadata)
|
203 |
print(f"INFO -- Config metadata: {config_metadata}")
|
204 |
|
|
|
75 |
|
76 |
|
77 |
SUPPORTED_TASKS = list(TASK_TO_ID.keys())
|
|
|
78 |
|
79 |
# Extracted from utils.get_supported_metrics
|
80 |
# Hardcoded for now due to speed / caching constraints
|
|
|
197 |
See the [docs](https://huggingface.co/docs/datasets/master/en/load_hub#configurations) for more details.
|
198 |
""",
|
199 |
)
|
200 |
+
# Some datasets have multiple metadata (one per config), so we grab the one associated with the selected config
|
201 |
config_metadata = get_config_metadata(selected_config, metadata)
|
202 |
print(f"INFO -- Config metadata: {config_metadata}")
|
203 |
|
utils.py
CHANGED
@@ -205,7 +205,7 @@ def get_config_metadata(config: str, metadata: List[Dict] = None) -> Union[Dict,
|
|
205 |
if metadata is None:
|
206 |
return None
|
207 |
config_metadata = [m for m in metadata if m["config"] == config]
|
208 |
-
if len(config_metadata)
|
209 |
return config_metadata[0]
|
210 |
else:
|
211 |
return None
|
|
|
205 |
if metadata is None:
|
206 |
return None
|
207 |
config_metadata = [m for m in metadata if m["config"] == config]
|
208 |
+
if len(config_metadata) >= 1:
|
209 |
return config_metadata[0]
|
210 |
else:
|
211 |
return None
|