WeMoveOn commited on
Commit
74814fe
1 Parent(s): 7de393f

check if args is a dict before treating it like a dict

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -68,7 +68,7 @@ def parse_metrics_rows(meta):
68
  if "dataset" not in result or "metrics" not in result:
69
  continue
70
  dataset = result["dataset"]["type"]
71
- if "args" in result["dataset"] and "language" in result["dataset"]["args"]:
72
  lang = result["dataset"]["args"]["language"]
73
  else:
74
  lang = meta["language"]
 
68
  if "dataset" not in result or "metrics" not in result:
69
  continue
70
  dataset = result["dataset"]["type"]
71
+ if "args" in result["dataset"] and "language" in result["dataset"]["args"] and isinstance(result["dataset"]["args"], dict):
72
  lang = result["dataset"]["args"]["language"]
73
  else:
74
  lang = meta["language"]