sh1gechan commited on
Commit
1a74c9d
1 Parent(s): 2c38c9a

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +7 -2
app.py CHANGED
@@ -279,10 +279,15 @@ with demo:
279
  # interactive=False,
280
  # visible=True,
281
  # )
 
 
 
 
 
282
  leaderboard_table = gr.components.Dataframe(
283
- value=leaderboard_df_filtered,
284
  headers=list(leaderboard_df_filtered.columns),
285
- datatype={col: "markdown" if col == "Model" else "str" for col in leaderboard_df_filtered.columns},
286
  elem_id="leaderboard-table",
287
  interactive=False,
288
  visible=True,
 
279
  # interactive=False,
280
  # visible=True,
281
  # )
282
+
283
+ print("Columns in leaderboard_df_filtered:", leaderboard_df_filtered.columns)
284
+
285
+ datatype_dict = {col: "markdown" if col == "Model" else "str" for col in leaderboard_df_filtered.columns}
286
+
287
  leaderboard_table = gr.components.Dataframe(
288
+ value=leaderboard_df_filtered.to_dict('records'), # DataFrame を辞書のリストに変換
289
  headers=list(leaderboard_df_filtered.columns),
290
+ datatype=datatype_dict,
291
  elem_id="leaderboard-table",
292
  interactive=False,
293
  visible=True,