sh1gechan commited on
Commit
cc9310e
·
verified ·
1 Parent(s): 6f43d67

Update src/populate.py

Browse files
Files changed (1) hide show
  1. src/populate.py +1 -0
src/populate.py CHANGED
@@ -17,6 +17,7 @@ def get_leaderboard_df(results_path: str, requests_path: str, cols: list, benchm
17
 
18
  df = pd.DataFrame.from_records(all_data_json)
19
  print(f"DataFrame before NaN filtering: {df}")
 
20
 
21
  score_cols = [
22
  'ALT E to J BLEU', 'ALT J to E BLEU', 'WikiCorpus E to J BLEU', 'WikiCorpus J to E BLEU',
 
17
 
18
  df = pd.DataFrame.from_records(all_data_json)
19
  print(f"DataFrame before NaN filtering: {df}")
20
+ df['Model'] = df['Model'].apply(lambda x: x.split('/')[-1] if isinstance(x, str) and '/' in x else x)
21
 
22
  score_cols = [
23
  'ALT E to J BLEU', 'ALT J to E BLEU', 'WikiCorpus E to J BLEU', 'WikiCorpus J to E BLEU',