hysts HF staff commited on
Commit
2dc5d96
1 Parent(s): 1c2485e

Show the number of claimed papers

Browse files
Files changed (1) hide show
  1. paper_list.py +4 -2
paper_list.py CHANGED
@@ -63,7 +63,7 @@ class PaperList:
63
  self.table['html_table_content'] = rows
64
 
65
  def render(self, search_query: str, case_sensitive: bool,
66
- filter_names: list[str]) -> tuple[int, str]:
67
  df = self.table
68
  if search_query:
69
  if case_sensitive:
@@ -77,7 +77,9 @@ class PaperList:
77
  has_hf_dataset = 'Dataset' in filter_names
78
  df = self.filter_table(df, has_arxiv, has_github, has_hf_space,
79
  has_hf_model, has_hf_dataset)
80
- return len(df), self.to_html(df, self.table_header)
 
 
81
 
82
  @staticmethod
83
  def filter_table(df: pd.DataFrame, has_arxiv: bool, has_github: bool,
 
63
  self.table['html_table_content'] = rows
64
 
65
  def render(self, search_query: str, case_sensitive: bool,
66
+ filter_names: list[str]) -> tuple[str, str]:
67
  df = self.table
68
  if search_query:
69
  if case_sensitive:
 
77
  has_hf_dataset = 'Dataset' in filter_names
78
  df = self.filter_table(df, has_arxiv, has_github, has_hf_space,
79
  has_hf_model, has_hf_dataset)
80
+ n_claimed = len(df[df.n_linked_authors > 0])
81
+ return f'{len(df)} ({n_claimed} claimed)', self.to_html(
82
+ df, self.table_header)
83
 
84
  @staticmethod
85
  def filter_table(df: pd.DataFrame, has_arxiv: bool, has_github: bool,