Yacine Jernite commited on
Commit
96b0317
1 Parent(s): feae7e1

fix seqs of seqs

Browse files
Files changed (1) hide show
  1. tagging_app.py +3 -1
tagging_app.py CHANGED
@@ -60,7 +60,9 @@ creator_set = {
60
  def filter_features(features, name="", is_sequence=False):
61
  if isinstance(features, list):
62
  return filter_features(features[0], name, is_sequence=True)
63
- elif features.get("_type", None) == 'Sequence':
 
 
64
  if "dtype" in features["feature"] or ("_type" in features["feature"] and features["feature"]["_type"] == "ClassLabel"):
65
  pre_filtered, desc = filter_features(features["feature"], name, is_sequence=True)
66
  filtered = {
 
60
  def filter_features(features, name="", is_sequence=False):
61
  if isinstance(features, list):
62
  return filter_features(features[0], name, is_sequence=True)
63
+ if not isinstance(features, dict):
64
+ return {}, []
65
+ if features.get("_type", None) == 'Sequence':
66
  if "dtype" in features["feature"] or ("_type" in features["feature"] and features["feature"]["_type"] == "ClassLabel"):
67
  pre_filtered, desc = filter_features(features["feature"], name, is_sequence=True)
68
  filtered = {