Spaces:
Running
on
Zero
Running
on
Zero
Commit
•
e69e216
1
Parent(s):
2259ea7
fix spits key error
Browse files
app.py
CHANGED
@@ -1,5 +1,7 @@
|
|
1 |
import requests
|
2 |
from collections import Counter
|
|
|
|
|
3 |
from requests.adapters import HTTPAdapter, Retry
|
4 |
import os
|
5 |
import time
|
@@ -271,7 +273,7 @@ with gr.Blocks() as demo:
|
|
271 |
}
|
272 |
subsets: list[str] = list(info_resp["dataset_info"])
|
273 |
subset = default_subset if default_subset in subsets else subsets[0]
|
274 |
-
splits: list[str] = info_resp["dataset_info"][subset]["splits"]
|
275 |
split = default_split if default_split in splits else splits[0]
|
276 |
features = info_resp["dataset_info"][subset]["features"]
|
277 |
|
@@ -288,7 +290,6 @@ with gr.Blocks() as demo:
|
|
288 |
text_column_dropdown: gr.Dropdown(choices=text_features + nested_text_features, label="Text column name"),
|
289 |
nested_text_column_dropdown: gr.Dropdown(visible=False),
|
290 |
}
|
291 |
-
logging.info(nested_text_features)
|
292 |
if text_feature in nested_text_features:
|
293 |
nested_keys = [feature_name for feature_name, feature in features[text_feature].items() if _is_string_feature(feature)]
|
294 |
return {
|
|
|
1 |
import requests
|
2 |
from collections import Counter
|
3 |
+
|
4 |
+
from fontTools.subset import subset
|
5 |
from requests.adapters import HTTPAdapter, Retry
|
6 |
import os
|
7 |
import time
|
|
|
273 |
}
|
274 |
subsets: list[str] = list(info_resp["dataset_info"])
|
275 |
subset = default_subset if default_subset in subsets else subsets[0]
|
276 |
+
splits: list[str] = list(info_resp["dataset_info"][subset]["splits"])
|
277 |
split = default_split if default_split in splits else splits[0]
|
278 |
features = info_resp["dataset_info"][subset]["features"]
|
279 |
|
|
|
290 |
text_column_dropdown: gr.Dropdown(choices=text_features + nested_text_features, label="Text column name"),
|
291 |
nested_text_column_dropdown: gr.Dropdown(visible=False),
|
292 |
}
|
|
|
293 |
if text_feature in nested_text_features:
|
294 |
nested_keys = [feature_name for feature_name, feature in features[text_feature].items() if _is_string_feature(feature)]
|
295 |
return {
|