Spaces:
Running
Running
Add Selene-1-Mini
Browse files
app.py
CHANGED
@@ -686,7 +686,6 @@ with gr.Blocks(theme="default", css=CSS_STYLES) as demo:
|
|
686 |
score3_description,
|
687 |
score4_description,
|
688 |
score5_description,
|
689 |
-
is_first_game,
|
690 |
):
|
691 |
# Build prompt data dictionary
|
692 |
prompt_data = {
|
@@ -706,36 +705,24 @@ with gr.Blocks(theme="default", css=CSS_STYLES) as demo:
|
|
706 |
if info.get("active", True)]
|
707 |
|
708 |
# Define new models list
|
709 |
-
new_models = ["Atla
|
710 |
|
711 |
-
|
712 |
-
|
713 |
-
|
714 |
-
|
|
|
715 |
other_model = random.choice(other_models)
|
716 |
|
717 |
-
# Randomly assign new model to either position A or B
|
718 |
if random.random() < 0.5:
|
719 |
-
model_a, model_b =
|
720 |
else:
|
721 |
-
model_a, model_b = other_model,
|
722 |
else:
|
723 |
-
# For
|
724 |
-
if
|
725 |
-
|
726 |
-
|
727 |
-
other_models = [m for m in active_models if m not in new_models]
|
728 |
-
other_model = random.choice(other_models)
|
729 |
-
|
730 |
-
if random.random() < 0.5:
|
731 |
-
model_a, model_b = new_model, other_model
|
732 |
-
else:
|
733 |
-
model_a, model_b = other_model, new_model
|
734 |
-
else:
|
735 |
-
# For other cases, exclude both Atla and Flow-Judge
|
736 |
-
non_special_models = [m for m in active_models if m not in new_models]
|
737 |
-
model1, model2 = random.sample(non_special_models, 2)
|
738 |
-
model_a, model_b = (model1, model2) if random.random() < 0.5 else (model2, model1)
|
739 |
|
740 |
# Get responses from models
|
741 |
response_a = get_model_response(
|
@@ -811,7 +798,7 @@ with gr.Blocks(theme="default", css=CSS_STYLES) as demo:
|
|
811 |
|
812 |
def handler(*args):
|
813 |
nonlocal first_game
|
814 |
-
result = submit_and_store(*args
|
815 |
first_game = False # Set to False after first submission
|
816 |
return result
|
817 |
|
@@ -831,7 +818,6 @@ with gr.Blocks(theme="default", css=CSS_STYLES) as demo:
|
|
831 |
score3_description,
|
832 |
score4_description,
|
833 |
score5_description,
|
834 |
-
first_game_state, # Add first_game_state as input
|
835 |
],
|
836 |
outputs=[
|
837 |
score_a,
|
@@ -848,7 +834,6 @@ with gr.Blocks(theme="default", css=CSS_STYLES) as demo:
|
|
848 |
model_name_b,
|
849 |
send_btn,
|
850 |
random_btn,
|
851 |
-
first_game_state, # Add first_game_state as output
|
852 |
],
|
853 |
)
|
854 |
|
|
|
686 |
score3_description,
|
687 |
score4_description,
|
688 |
score5_description,
|
|
|
689 |
):
|
690 |
# Build prompt data dictionary
|
691 |
prompt_data = {
|
|
|
705 |
if info.get("active", True)]
|
706 |
|
707 |
# Define new models list
|
708 |
+
new_models = ["Atla Selene 1 Mini", "Flow-Judge-0.1", "SFR-LLaMA-3.1-70B-Judge"]
|
709 |
|
710 |
+
# New models appear 40% of the time
|
711 |
+
if random.random() < 0.4:
|
712 |
+
# Randomly choose between new models
|
713 |
+
new_model = random.choice(new_models)
|
714 |
+
other_models = [m for m in active_models if m not in new_models]
|
715 |
other_model = random.choice(other_models)
|
716 |
|
|
|
717 |
if random.random() < 0.5:
|
718 |
+
model_a, model_b = new_model, other_model
|
719 |
else:
|
720 |
+
model_a, model_b = other_model, new_model
|
721 |
else:
|
722 |
+
# For other cases, exclude new models
|
723 |
+
non_special_models = [m for m in active_models if m not in new_models]
|
724 |
+
model1, model2 = random.sample(non_special_models, 2)
|
725 |
+
model_a, model_b = (model1, model2) if random.random() < 0.5 else (model2, model1)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
726 |
|
727 |
# Get responses from models
|
728 |
response_a = get_model_response(
|
|
|
798 |
|
799 |
def handler(*args):
|
800 |
nonlocal first_game
|
801 |
+
result = submit_and_store(*args)
|
802 |
first_game = False # Set to False after first submission
|
803 |
return result
|
804 |
|
|
|
818 |
score3_description,
|
819 |
score4_description,
|
820 |
score5_description,
|
|
|
821 |
],
|
822 |
outputs=[
|
823 |
score_a,
|
|
|
834 |
model_name_b,
|
835 |
send_btn,
|
836 |
random_btn,
|
|
|
837 |
],
|
838 |
)
|
839 |
|