Spaces:
Running
Running
handle list feature
Browse files- tagging_app.py +3 -1
tagging_app.py
CHANGED
@@ -58,7 +58,9 @@ creator_set = {
|
|
58 |
|
59 |
@st.cache
|
60 |
def filter_features(feature_dict):
|
61 |
-
if feature_dict
|
|
|
|
|
62 |
return {
|
63 |
"feature_type": feature_dict["_type"],
|
64 |
"dtype": feature_dict["dtype"],
|
|
|
58 |
|
59 |
@st.cache
|
60 |
def filter_features(feature_dict):
|
61 |
+
if isinstance(feature_dict, list):
|
62 |
+
return dict([(k, filter_features(v)) for k, v in feature_dict[0].items()])
|
63 |
+
elif feature_dict.get("_type", None) == 'Value':
|
64 |
return {
|
65 |
"feature_type": feature_dict["_type"],
|
66 |
"dtype": feature_dict["dtype"],
|