Spaces:
Runtime error
Runtime error
Commit
·
00785bd
1
Parent(s):
b54cb8f
formatting
Browse files
app.py
CHANGED
@@ -63,11 +63,11 @@ def rank_space_and_org(space_or_org_id, filter_zero):
|
|
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']
|
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']
|
71 |
|
72 |
|
73 |
with gr.Blocks() as demo:
|
@@ -87,7 +87,7 @@ with gr.Blocks() as demo:
|
|
87 |
filter_zero = gr.Radio(
|
88 |
choices=["no", "yes"],
|
89 |
label="Filter out spaces with 0 likes in the ranking?",
|
90 |
-
value="
|
91 |
)
|
92 |
run_btn = gr.Button("Rank Space!", label="Rank Space")
|
93 |
result = gr.Markdown()
|
|
|
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'],} orgs/users above and {org_rank['num_lower'],} orgs/users below in the raking."""
|
71 |
|
72 |
|
73 |
with gr.Blocks() as demo:
|
|
|
87 |
filter_zero = gr.Radio(
|
88 |
choices=["no", "yes"],
|
89 |
label="Filter out spaces with 0 likes in the ranking?",
|
90 |
+
value="yes",
|
91 |
)
|
92 |
run_btn = gr.Button("Rank Space!", label="Rank Space")
|
93 |
result = gr.Markdown()
|