tdurbor commited on
Commit
7f0069a
1 Parent(s): c2e7b5b

Reorganise to make info smoother

Browse files
Files changed (1) hide show
  1. app.py +4 -5
app.py CHANGED
@@ -111,7 +111,6 @@ def get_notice_markdown():
111
  """Generate the notice markdown with dynamic vote count."""
112
  total_votes = len(get_all_votes())
113
  return f"""
114
- # ⚔️ Background Removal Arena: Compare & Test the Best Background Removal Models
115
 
116
  ## 📜 How It Works
117
  - **Blind Test**: You will see two images with their background removed from two anonymous background removal models (Clipdrop, RemoveBG, Photoroom, BRIA RMBG 2.0).
@@ -120,7 +119,7 @@ def get_notice_markdown():
120
  ## 📊 Stats
121
  - **Total #votes**: {total_votes}
122
 
123
- ## 👇 Test now!
124
  """
125
 
126
  def compute_mask_difference(segmented_a, segmented_b):
@@ -195,13 +194,13 @@ function load_zoom() {
195
  def gradio_interface():
196
  """Create and return the Gradio interface."""
197
  with gr.Blocks(js=js, fill_width=True) as demo:
198
- gr.Markdown("# Background Removal Arena")
199
  button_name = "Difference between masks"
200
 
201
  with gr.Tabs() as tabs:
202
  with gr.Tab("⚔️ Arena (battle)", id=0):
203
  image_width = None
204
- notice_markdown = gr.Markdown(get_notice_markdown(), elem_id="notice_markdown")
205
  with gr.Row(equal_height=True):
206
  def on_enter_contest(username):
207
  feedback_message = f"Thank you, {username or 'anonymous'}! You can see how you rank in the Hall of Fame."
@@ -322,6 +321,7 @@ def gradio_interface():
322
 
323
  return outputs + [new_notice_markdown]
324
 
 
325
  vote_a_button.click(
326
  fn=lambda username: vote_for_model("model_a", state_filename, state_model_a_name, state_model_b_name, username),
327
  inputs=[username_input],
@@ -347,7 +347,6 @@ def gradio_interface():
347
  ]
348
  )
349
 
350
-
351
  with gr.Tab("🏆 Leaderboard", id=1) as leaderboard_tab:
352
  rankings_table = gr.Dataframe(
353
  headers=["Model", "Ranking"],
 
111
  """Generate the notice markdown with dynamic vote count."""
112
  total_votes = len(get_all_votes())
113
  return f"""
 
114
 
115
  ## 📜 How It Works
116
  - **Blind Test**: You will see two images with their background removed from two anonymous background removal models (Clipdrop, RemoveBG, Photoroom, BRIA RMBG 2.0).
 
119
  ## 📊 Stats
120
  - **Total #votes**: {total_votes}
121
 
122
+
123
  """
124
 
125
  def compute_mask_difference(segmented_a, segmented_b):
 
194
  def gradio_interface():
195
  """Create and return the Gradio interface."""
196
  with gr.Blocks(js=js, fill_width=True) as demo:
197
+ gr.Markdown("#Background Removal Arena: Compare & Test the Best Background Removal Models")
198
  button_name = "Difference between masks"
199
 
200
  with gr.Tabs() as tabs:
201
  with gr.Tab("⚔️ Arena (battle)", id=0):
202
  image_width = None
203
+
204
  with gr.Row(equal_height=True):
205
  def on_enter_contest(username):
206
  feedback_message = f"Thank you, {username or 'anonymous'}! You can see how you rank in the Hall of Fame."
 
321
 
322
  return outputs + [new_notice_markdown]
323
 
324
+ notice_markdown = gr.Markdown(get_notice_markdown(), elem_id="notice_markdown")
325
  vote_a_button.click(
326
  fn=lambda username: vote_for_model("model_a", state_filename, state_model_a_name, state_model_b_name, username),
327
  inputs=[username_input],
 
347
  ]
348
  )
349
 
 
350
  with gr.Tab("🏆 Leaderboard", id=1) as leaderboard_tab:
351
  rankings_table = gr.Dataframe(
352
  headers=["Model", "Ranking"],