remove the models with 0 ckpt and ignore the repeat papers when counting papers (#135)

pull/130/head
congee 2021-01-08 20:40:44 +08:00 committed by GitHub
parent 1df10beaa1
commit 3a8d8a2455
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 2 deletions

View File

@ -20,12 +20,15 @@ for f in files:
title = content.split('\n')[0].replace('# ', '')
titles.append(title)
ckpts = set(x.lower().strip()
for x in re.findall(r'\[model\]\((https?.*)\)', content))
if len(ckpts) == 0:
continue
num_ckpts += len(ckpts)
titles.append(title)
statsmsg = f"""
\t* [{title}]({url}) ({len(ckpts)} ckpts)
@ -37,7 +40,7 @@ msglist = '\n'.join(x for _, _, x in stats)
modelzoo = f"""
# Model Zoo Statistics
* Number of papers: {len(titles)}
* Number of papers: {len(set(titles))}
* Number of checkpoints: {num_ckpts}
{msglist}
"""