Spaces:
Running
Running
fix for new version
Browse files
app.py
CHANGED
@@ -29,6 +29,9 @@ def fix_df(df):
|
|
29 |
for col in ["predictions", "metrics", "choices", "gold", "gold_index"]:
|
30 |
if col in df.columns:
|
31 |
df[col] = [ast.literal_eval(x) if isinstance(x, str) else x for x in df[col].values]
|
|
|
|
|
|
|
32 |
return df
|
33 |
|
34 |
def get_run_name_seed(run_name):
|
|
|
29 |
for col in ["predictions", "metrics", "choices", "gold", "gold_index"]:
|
30 |
if col in df.columns:
|
31 |
df[col] = [ast.literal_eval(x) if isinstance(x, str) else x for x in df[col].values]
|
32 |
+
|
33 |
+
if col == "predictions":
|
34 |
+
df[col] = df[col].apply(lambda x: [[z[0] for z in x]] if is_arary_like(x) and len(x[0]) == 2 else x)
|
35 |
return df
|
36 |
|
37 |
def get_run_name_seed(run_name):
|