sh1gechan commited on
Commit
96495f6
1 Parent(s): 04dee2e

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -10
app.py CHANGED
@@ -298,6 +298,9 @@ with demo:
298
 
299
  leaderboard_df_filtered = leaderboard_df_filtered.rename(columns={'T': 'Type_'})
300
 
 
 
 
301
  # データフレームの内容を確認
302
  print("Columns in leaderboard_df_filtered:")
303
  print(leaderboard_df_filtered.columns)
@@ -308,16 +311,7 @@ with demo:
308
  leaderboard_df_filtered['Type_'] = leaderboard_df_filtered['Type_'].astype(str)
309
 
310
  # datatypeを準備
311
- datatype_dict = {}
312
- for col in leaderboard_df_filtered.columns:
313
- if col == 'Model':
314
- datatype_dict[col] = "str"
315
- elif col in TYPES:
316
- datatype_dict[col] = TYPES[col]
317
- else:
318
- datatype_dict[col] = "str"
319
-
320
- datatype_dict['Type_'] = "str"
321
 
322
  # デバッグ用出力
323
  print("\nDatatype dictionary:")
@@ -331,6 +325,7 @@ with demo:
331
  elem_id="leaderboard-table",
332
  interactive=False,
333
  visible=True,
 
334
  )
335
 
336
  # デバッグ情報の出力
 
298
 
299
  leaderboard_df_filtered = leaderboard_df_filtered.rename(columns={'T': 'Type_'})
300
 
301
+ # カラム名を単純化
302
+ leaderboard_df_filtered.columns = [c.replace(' ', '_').replace('-', '_') for c in leaderboard_df_filtered.columns]
303
+
304
  # データフレームの内容を確認
305
  print("Columns in leaderboard_df_filtered:")
306
  print(leaderboard_df_filtered.columns)
 
311
  leaderboard_df_filtered['Type_'] = leaderboard_df_filtered['Type_'].astype(str)
312
 
313
  # datatypeを準備
314
+ datatype_dict = {col: "str" for col in leaderboard_df_filtered.columns}
 
 
 
 
 
 
 
 
 
315
 
316
  # デバッグ用出力
317
  print("\nDatatype dictionary:")
 
325
  elem_id="leaderboard-table",
326
  interactive=False,
327
  visible=True,
328
+ wrap=True,
329
  )
330
 
331
  # デバッグ情報の出力