Spaces:
Runtime error
Runtime error
Commit
β’
f756530
1
Parent(s):
04c52df
fix url
Browse files
app.py
CHANGED
@@ -239,7 +239,7 @@ def _rank_single_repo(space_or_org_id, kind, filter_zero):
|
|
239 |
if kind == "space":
|
240 |
result += f"""- Space [{space_or_org_id}](https://huggingface.co/spaces/{space_or_org_id}) is ranked {repo_rank['rank']:.2f}%\n"""
|
241 |
if kind == "model":
|
242 |
-
result += f"""- Model [{space_or_org_id}](https://huggingface.co/
|
243 |
if kind == "dataset":
|
244 |
result += f"""- Dataset [{space_or_org_id}](https://huggingface.co/dataset/{space_or_org_id}) is ranked {repo_rank['rank']:.2f}%\n"""
|
245 |
result += f"""- You have {repo_rank['num_higher']:,} {kind}s above and {repo_rank['num_lower']:,} {kind}s below in the ranking of {kind}s likes\n\n"""
|
@@ -352,7 +352,7 @@ def _plot_top_n_hub_repos(kind: HubRepoType, metric="likes", top_n=100):
|
|
352 |
top_n = get_top_n_models(metric, top_n)
|
353 |
header = """## π
Top 100 Model repositories by Likes π
"""
|
354 |
body = "".join(
|
355 |
-
f"\n{i+1}. [{model}](https://huggingface.co/
|
356 |
f" {likes:,} likes"
|
357 |
for i, (model, likes) in enumerate(top_n)
|
358 |
)
|
|
|
239 |
if kind == "space":
|
240 |
result += f"""- Space [{space_or_org_id}](https://huggingface.co/spaces/{space_or_org_id}) is ranked {repo_rank['rank']:.2f}%\n"""
|
241 |
if kind == "model":
|
242 |
+
result += f"""- Model [{space_or_org_id}](https://huggingface.co/{space_or_org_id}) is ranked {repo_rank['rank']:.2f}%\n"""
|
243 |
if kind == "dataset":
|
244 |
result += f"""- Dataset [{space_or_org_id}](https://huggingface.co/dataset/{space_or_org_id}) is ranked {repo_rank['rank']:.2f}%\n"""
|
245 |
result += f"""- You have {repo_rank['num_higher']:,} {kind}s above and {repo_rank['num_lower']:,} {kind}s below in the ranking of {kind}s likes\n\n"""
|
|
|
352 |
top_n = get_top_n_models(metric, top_n)
|
353 |
header = """## π
Top 100 Model repositories by Likes π
"""
|
354 |
body = "".join(
|
355 |
+
f"\n{i+1}. [{model}](https://huggingface.co/{model}) with"
|
356 |
f" {likes:,} likes"
|
357 |
for i, (model, likes) in enumerate(top_n)
|
358 |
)
|