Spaces:
Sleeping
Sleeping
limit number of rows rendered
Browse files
app.py
CHANGED
@@ -127,7 +127,7 @@ def filter_with_metric(df, selected_runs, metric_name):
|
|
127 |
df = df.drop(columns=other_metrics)
|
128 |
widths = get_column_widths(df)
|
129 |
df = consize_runname_metric(df, selected_runs, metric_name)
|
130 |
-
return gr.update(value=df, column_widths=widths)
|
131 |
|
132 |
def get_column_widths(df):
|
133 |
column_widths = []
|
@@ -137,7 +137,7 @@ def get_column_widths(df):
|
|
137 |
elif col in ["choices", "gold"]:
|
138 |
column_widths.append("250px")
|
139 |
elif col.startswith("metric_"):
|
140 |
-
column_widths.append("
|
141 |
else:
|
142 |
column_widths.append("200px") # Default width for other columns
|
143 |
return column_widths
|
|
|
127 |
df = df.drop(columns=other_metrics)
|
128 |
widths = get_column_widths(df)
|
129 |
df = consize_runname_metric(df, selected_runs, metric_name)
|
130 |
+
return gr.update(value=df, column_widths=widths, row_count=(100, 'fixed'))
|
131 |
|
132 |
def get_column_widths(df):
|
133 |
column_widths = []
|
|
|
137 |
elif col in ["choices", "gold"]:
|
138 |
column_widths.append("250px")
|
139 |
elif col.startswith("metric_"):
|
140 |
+
column_widths.append("50px")
|
141 |
else:
|
142 |
column_widths.append("200px") # Default width for other columns
|
143 |
return column_widths
|