valhalla commited on
Commit
ea6b249
1 Parent(s): 97e23ac

handle list feature

Browse files
Files changed (1) hide show
  1. 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.get("_type", None) == 'Value':
 
 
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"],