MohamedRashad commited on
Commit
cbdd9d6
·
1 Parent(s): fa1c579

Fix model link formatting in load_json_results and add debug print statement in load_requests

Browse files
Files changed (1) hide show
  1. utils.py +2 -1
utils.py CHANGED
@@ -23,7 +23,7 @@ def load_json_results(file_path: Path, prepare_for_display=False, sort_col=None,
23
  raise FileNotFoundError(f"File '{file_path}' not found.")
24
  if prepare_for_display:
25
  # Apply common mapping for model link formatting.
26
- df[["Model"]] = df[["Model"]].applymap(lambda x: f'<a href="https://huggingface.co/{x}" target="_blank">{x}</a>')
27
  if drop_cols is not None:
28
  df.drop(columns=drop_cols, inplace=True)
29
  if sort_col is not None:
@@ -203,6 +203,7 @@ def load_requests(status_folder, task_type=None):
203
  continue # Skip files that can't be loaded
204
 
205
  df = pd.DataFrame(requests_data)
 
206
 
207
  # Filter by task type
208
  if task_type:
 
23
  raise FileNotFoundError(f"File '{file_path}' not found.")
24
  if prepare_for_display:
25
  # Apply common mapping for model link formatting.
26
+ df[["Model"]] = df[["Model"]].map(lambda x: f'<a href="https://huggingface.co/{x}" target="_blank">{x}</a>')
27
  if drop_cols is not None:
28
  df.drop(columns=drop_cols, inplace=True)
29
  if sort_col is not None:
 
203
  continue # Skip files that can't be loaded
204
 
205
  df = pd.DataFrame(requests_data)
206
+ print(df)
207
 
208
  # Filter by task type
209
  if task_type: