Spaces:
Runtime error
Runtime error
Commit
·
83d0ce6
1
Parent(s):
263c06c
also return above and below
Browse files
app.py
CHANGED
@@ -62,12 +62,12 @@ def rank_space_and_org(space_or_org_id, filter_zero):
|
|
62 |
split = space_or_org_id.split("/")
|
63 |
if len(split) == 2:
|
64 |
space_rank = relative_rank_for_space(space_or_org_id, filter_zero=filter_zero)
|
65 |
-
return f"Space {space_or_org_id} is ranked {space_rank['rank']:.2f}%
|
|
|
66 |
if len(split) == 1:
|
67 |
org_rank = relative_rank_for_org(space_or_org_id, filter_zero=filter_zero)
|
68 |
-
return
|
69 |
-
|
70 |
-
)
|
71 |
|
72 |
|
73 |
with gr.Blocks() as demo:
|
|
|
62 |
split = space_or_org_id.split("/")
|
63 |
if len(split) == 2:
|
64 |
space_rank = relative_rank_for_space(space_or_org_id, filter_zero=filter_zero)
|
65 |
+
return f"""Space {space_or_org_id} is ranked {space_rank['rank']:.2f}%
|
66 |
+
with {space_rank['num_higher']} Spaces above and {space_rank['num_lower']} Spaces below in the raking."""
|
67 |
if len(split) == 1:
|
68 |
org_rank = relative_rank_for_org(space_or_org_id, filter_zero=filter_zero)
|
69 |
+
return f"""Organization or user {space_or_org_id} is ranked {org_rank['rank']:.2f}%
|
70 |
+
with {org_rank['num_higher']} Spaces above and {org_rank['num_lower']} Spaces below in the raking."""
|
|
|
71 |
|
72 |
|
73 |
with gr.Blocks() as demo:
|