zhilinw commited on
Commit
ae87b7e
·
verified ·
1 Parent(s): ee52384

Upload app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -53,7 +53,7 @@ def color_model_type_column(df, color_map):
53
  format_dict["Cost"] = "{:.2f}"
54
 
55
 
56
- return df.style.applymap(apply_color, subset=["Category"]).format(format_dict, na_rep="")
57
 
58
 
59
  def regex_table(dataframe, regex, filter_button, style=True):
@@ -147,7 +147,7 @@ with gr.Blocks(theme=theme) as app:
147
  datatype=col_types_response_generation,
148
  headers=df_response_generation.columns.tolist(),
149
  elem_id="response_generation_dataframe",
150
- height=800, # 800 px ≈ ~25 rows on default row-height
151
  )
152
 
153
  with gr.TabItem("LLM Judge"):
@@ -189,7 +189,7 @@ with gr.Blocks(theme=theme) as app:
189
  datatype=col_types_llm_judge,
190
  headers=df_llm_judge.columns.tolist(),
191
  elem_id="llm_judge_dataframe",
192
- height=800, # 800 px ≈ ~25 rows on default row-height
193
  )
194
 
195
  search_1.change(regex_table, inputs=[rewardbench_table_hidden, search_1, model_types_1], outputs=rewardbench_table)
 
53
  format_dict["Cost"] = "{:.2f}"
54
 
55
 
56
+ return df.style.map(apply_color, subset=["Category"]).format(format_dict, na_rep="")
57
 
58
 
59
  def regex_table(dataframe, regex, filter_button, style=True):
 
147
  datatype=col_types_response_generation,
148
  headers=df_response_generation.columns.tolist(),
149
  elem_id="response_generation_dataframe",
150
+ row_count=(25, "dynamic"),
151
  )
152
 
153
  with gr.TabItem("LLM Judge"):
 
189
  datatype=col_types_llm_judge,
190
  headers=df_llm_judge.columns.tolist(),
191
  elem_id="llm_judge_dataframe",
192
+ row_count=(25, "dynamic"),
193
  )
194
 
195
  search_1.change(regex_table, inputs=[rewardbench_table_hidden, search_1, model_types_1], outputs=rewardbench_table)