sh1gechan commited on
Commit
36bebf5
1 Parent(s): 1bfcac8

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +11 -3
app.py CHANGED
@@ -315,12 +315,13 @@ with demo:
315
  # データを辞書のリストに変換
316
  data_dict = leaderboard_df_filtered.to_dict('records')
317
 
318
- value = leaderboard_df_filtered.values.tolist()
 
319
  headers = list(leaderboard_df_filtered.columns)
320
  datatype = {col: "str" for col in headers}
321
 
322
  leaderboard_table = gr.Dataframe(
323
- value=value,
324
  headers=headers,
325
  datatype=datatype,
326
  elem_id="leaderboard-table",
@@ -328,6 +329,7 @@ with demo:
328
  visible=True,
329
  )
330
 
 
331
 
332
  # デバッグ情報の出力
333
  print("\nLeaderboard table headers:")
@@ -414,8 +416,14 @@ with demo:
414
  open=False,
415
  ):
416
  with gr.Row():
 
 
 
 
 
 
417
  finished_eval_table = gr.components.Dataframe(
418
- value=finished_eval_queue_df,
419
  headers=EVAL_COLS,
420
  datatype=EVAL_TYPES,
421
  row_count=5,
 
315
  # データを辞書のリストに変換
316
  data_dict = leaderboard_df_filtered.to_dict('records')
317
 
318
+ data_dict = leaderboard_df_filtered.to_dict('records')
319
+
320
  headers = list(leaderboard_df_filtered.columns)
321
  datatype = {col: "str" for col in headers}
322
 
323
  leaderboard_table = gr.Dataframe(
324
+ value=data_dict, # 修正箇所: list of dicts に変更
325
  headers=headers,
326
  datatype=datatype,
327
  elem_id="leaderboard-table",
 
329
  visible=True,
330
  )
331
 
332
+
333
 
334
  # デバッグ情報の出力
335
  print("\nLeaderboard table headers:")
 
416
  open=False,
417
  ):
418
  with gr.Row():
419
+ # finished_eval_table = gr.components.Dataframe(
420
+ # value=finished_eval_queue_df,
421
+ # headers=EVAL_COLS,
422
+ # datatype=EVAL_TYPES,
423
+ # row_count=5,
424
+ # )
425
  finished_eval_table = gr.components.Dataframe(
426
+ value=finished_eval_queue_df.to_dict('records'), # 修正箇所: list of dicts に変更
427
  headers=EVAL_COLS,
428
  datatype=EVAL_TYPES,
429
  row_count=5,