Sasha commited on
Commit
779cfb9
1 Parent(s): af7fcaa

adding the catch for glue and paws (for loading them) -- thanks @quentin !

Browse files
Files changed (1) hide show
  1. app.py +4 -3
app.py CHANGED
@@ -119,12 +119,13 @@ else:
119
  #print(dataset_name, dataset_config, dataset_split)
120
 
121
  #print(labels.head())
122
-
123
-
 
 
124
 
125
  try:
126
  num_classes = dataset_builder.info.features['label'].num_classes
127
- dataset = load_dataset(dataset_name, split=dataset_split)
128
  labels = query("SELECT COUNT(*) from dataset GROUP BY label").to_pandas()
129
  labels = labels.rename(columns={"count_star()": "count"})
130
  labels.index = dataset_builder.info.features['label'].names
 
119
  #print(dataset_name, dataset_config, dataset_split)
120
 
121
  #print(labels.head())
122
+ if dataset_name in ['glue','super_glue', 'paws']:
123
+ dataset = load_dataset(dataset_name, dataset_config, split=dataset_split)
124
+ else:
125
+ dataset = load_dataset(dataset_name, split=dataset_split)
126
 
127
  try:
128
  num_classes = dataset_builder.info.features['label'].num_classes
 
129
  labels = query("SELECT COUNT(*) from dataset GROUP BY label").to_pandas()
130
  labels = labels.rename(columns={"count_star()": "count"})
131
  labels.index = dataset_builder.info.features['label'].names