kaikaidai commited on
Commit
9fb17ef
·
verified ·
1 Parent(s): 5407740

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -4
app.py CHANGED
@@ -162,7 +162,7 @@ def get_vote_message(choice: str, model_a: str, model_b: str) -> str:
162
  pos_b = rankings.get(model_b, 0)
163
 
164
  if choice == "Tie":
165
- return f"It's a tie! Currently, {model_a} ranks #{pos_a} and {model_b} ranks #{pos_b}. \nYour votes shapes the leaderboard, carry on voting responsibly :)"
166
 
167
  # Get chosen and rejected models based on vote
168
  model_chosen = model_a if choice == "A" else model_b
@@ -172,9 +172,9 @@ def get_vote_message(choice: str, model_a: str, model_b: str) -> str:
172
 
173
  # Check if vote aligns with leaderboard
174
  if (choice == "A" and pos_a < pos_b) or (choice == "B" and pos_b < pos_a):
175
- return f"You're in touch with the community! {model_chosen} ranks #{pos_chosen} ahead of {model_rejected} in #{pos_rejected}. \nYour votes shapes the leaderboard, carry on voting responsibly :)"
176
  else:
177
- return f"You don't think like everyone else ;) {model_chosen} ranks #{pos_chosen} which is behind {model_rejected} in #{pos_rejected}. \nYour votes shapes the leaderboard, carry on voting responsibly :)"
178
 
179
 
180
  def vote(
@@ -239,7 +239,7 @@ def vote(
239
  gr.update(value=f"*Model: {model_b}*"), # model_name_b
240
  gr.update(interactive=True, value="Regenerate judges", variant="secondary"), # send_btn
241
  gr.update(value="🎲 New round", variant="primary"), # random_btn
242
- gr.Info(message, title = "🥳 Thanks for your vote!"), # success message
243
  ]
244
 
245
 
 
162
  pos_b = rankings.get(model_b, 0)
163
 
164
  if choice == "Tie":
165
+ return f"It's a tie! Currently, {model_a} ranks #{pos_a} and {model_b} ranks #{pos_b}. \n"
166
 
167
  # Get chosen and rejected models based on vote
168
  model_chosen = model_a if choice == "A" else model_b
 
172
 
173
  # Check if vote aligns with leaderboard
174
  if (choice == "A" and pos_a < pos_b) or (choice == "B" and pos_b < pos_a):
175
+ return f"You're in-line with the community! {model_chosen} ranks #{pos_chosen} ahead of {model_rejected} in #{pos_rejected}. \n"
176
  else:
177
+ return f"You don't think like everyone else ;) {model_chosen} ranks #{pos_chosen} which is behind {model_rejected} in #{pos_rejected}. \n"
178
 
179
 
180
  def vote(
 
239
  gr.update(value=f"*Model: {model_b}*"), # model_name_b
240
  gr.update(interactive=True, value="Regenerate judges", variant="secondary"), # send_btn
241
  gr.update(value="🎲 New round", variant="primary"), # random_btn
242
+ gr.Info(message, title = "🥳 Thanks for voting responsibly!"), # success message
243
  ]
244
 
245