davanstrien HF staff commited on
Commit
b54cb8f
1 Parent(s): 12723e2

order options

Browse files
Files changed (1) hide show
  1. app.py +3 -3
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']} 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:
@@ -85,7 +85,7 @@ with gr.Blocks() as demo:
85
  with gr.Row():
86
  space_id = gr.Textbox(max_lines=1, label="Space ID")
87
  filter_zero = gr.Radio(
88
- choices=["no","yes"],
89
  label="Filter out spaces with 0 likes in the ranking?",
90
  value="no",
91
  )
 
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']:.2f} 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']:.2f} orgs/users above and {org_rank['num_lower']:.2f} orgs/users below in the raking."""
71
 
72
 
73
  with gr.Blocks() as demo:
 
85
  with gr.Row():
86
  space_id = gr.Textbox(max_lines=1, label="Space ID")
87
  filter_zero = gr.Radio(
88
+ choices=["no", "yes"],
89
  label="Filter out spaces with 0 likes in the ranking?",
90
  value="no",
91
  )