kaikaidai commited on
Commit
89d760f
·
verified ·
1 Parent(s): fb9ce1d

Re-add flow judge

Browse files
Files changed (1) hide show
  1. app.py +7 -4
app.py CHANGED
@@ -705,10 +705,13 @@ with gr.Blocks(theme="default", css=CSS_STYLES) as demo:
705
  active_models = [name for name, info in model_data.items()
706
  if info.get("active", True)]
707
 
708
- atla_model = "Atla-8B-preview"
 
 
709
 
710
  if is_first_game:
711
  # For the first game, ensure new model is one of the models to catch up on votes
 
712
  other_models = [m for m in active_models if m != atla_model]
713
  other_model = random.choice(other_models)
714
 
@@ -721,8 +724,8 @@ with gr.Blocks(theme="default", css=CSS_STYLES) as demo:
721
  # For subsequent games, new models appears 40% of the time
722
  if random.random() < 0.4:
723
  # Randomly choose between new models
724
- new_model = random.choice(["Atla-8B-preview"]) # add "Flow-Judge-1.0" once ready
725
- other_models = [m for m in active_models if m not in [new_model]]
726
  other_model = random.choice(other_models)
727
 
728
  if random.random() < 0.5:
@@ -731,7 +734,7 @@ with gr.Blocks(theme="default", css=CSS_STYLES) as demo:
731
  model_a, model_b = other_model, new_model
732
  else:
733
  # For other cases, exclude both Atla and Flow-Judge
734
- non_special_models = [m for m in active_models if m not in new_model]
735
  model1, model2 = random.sample(non_special_models, 2)
736
  model_a, model_b = (model1, model2) if random.random() < 0.5 else (model2, model1)
737
 
 
705
  active_models = [name for name, info in model_data.items()
706
  if info.get("active", True)]
707
 
708
+
709
+ # Define new models list
710
+ new_models = ["Atla-8B-preview", "Flow-Judge-1.0"] # add "Flow-Judge-1.0" once ready
711
 
712
  if is_first_game:
713
  # For the first game, ensure new model is one of the models to catch up on votes
714
+ atla_model = "Atla-8B-preview"
715
  other_models = [m for m in active_models if m != atla_model]
716
  other_model = random.choice(other_models)
717
 
 
724
  # For subsequent games, new models appears 40% of the time
725
  if random.random() < 0.4:
726
  # Randomly choose between new models
727
+ new_model = random.choice(new_models)
728
+ other_models = [m for m in active_models if m not in new_models]
729
  other_model = random.choice(other_models)
730
 
731
  if random.random() < 0.5:
 
734
  model_a, model_b = other_model, new_model
735
  else:
736
  # For other cases, exclude both Atla and Flow-Judge
737
+ non_special_models = [m for m in active_models if m not in new_models]
738
  model1, model2 = random.sample(non_special_models, 2)
739
  model_a, model_b = (model1, model2) if random.random() < 0.5 else (model2, model1)
740