kaikaidai commited on
Commit
6ef585c
·
verified ·
1 Parent(s): 09b8ee9

Added Atla Selene / Selene Mini API

Browse files
Files changed (1) hide show
  1. app.py +6 -8
app.py CHANGED
@@ -13,7 +13,7 @@ from gen_api_answer import (
13
  get_model_response,
14
  parse_model_response,
15
  prometheus_parse_model_response,
16
- atla_parse_model_response,
17
  flow_judge_parse_model_response
18
  )
19
 
@@ -706,7 +706,7 @@ with gr.Blocks(theme="default", css=CSS_STYLES) as demo:
706
  if info.get("active", True) is True] # Explicitly check for True
707
 
708
  # Define new models list
709
- new_models = ["Atla Selene 1 Mini", "SFR-LLaMA-3.1-70B-Judge"]
710
 
711
  # New models appear 40% of the time
712
  if random.random() < 0.4:
@@ -742,8 +742,6 @@ with gr.Blocks(theme="default", css=CSS_STYLES) as demo:
742
 
743
  is_prometheus_a = model_data.get(model_a, {}).get('organization') == 'Prometheus'
744
  is_prometheus_b = model_data.get(model_b, {}).get('organization') == 'Prometheus'
745
- is_atla_a = model_data.get(model_a, {}).get('organization') == 'Atla'
746
- is_atla_b = model_data.get(model_b, {}).get('organization') == 'Atla'
747
  is_flow_judge_a = model_data.get(model_a, {}).get('organization') == 'Flow AI'
748
  is_flow_judge_b = model_data.get(model_b, {}).get('organization') == 'Flow AI'
749
  is_salesforce_a = model_data.get(model_a, {}).get('organization') == 'Salesforce'
@@ -753,8 +751,8 @@ with gr.Blocks(theme="default", css=CSS_STYLES) as demo:
753
  if is_prometheus_a:
754
  score_a_val, critique_a_val = prometheus_parse_model_response(response_a)
755
  score_a_val = f"{score_a_val} / 5"
756
- elif is_atla_a or is_salesforce_a: # Same parser for Atla and Salesforce
757
- score_a_val, critique_a_val = atla_parse_model_response(response_a)
758
  score_a_val = f"{score_a_val} / 5"
759
  elif is_flow_judge_a:
760
  score_a_val, critique_a_val = flow_judge_parse_model_response(response_a)
@@ -766,8 +764,8 @@ with gr.Blocks(theme="default", css=CSS_STYLES) as demo:
766
  if is_prometheus_b:
767
  score_b_val, critique_b_val = prometheus_parse_model_response(response_b)
768
  score_b_val = f"{score_b_val} / 5"
769
- elif is_atla_b or is_salesforce_b: # Same parser for Atla and Salesforce
770
- score_b_val, critique_b_val = atla_parse_model_response(response_b)
771
  score_b_val = f"{score_b_val} / 5"
772
  elif is_flow_judge_b:
773
  score_b_val, critique_b_val = flow_judge_parse_model_response(response_b)
 
13
  get_model_response,
14
  parse_model_response,
15
  prometheus_parse_model_response,
16
+ salesforce_parse_model_response,
17
  flow_judge_parse_model_response
18
  )
19
 
 
706
  if info.get("active", True) is True] # Explicitly check for True
707
 
708
  # Define new models list
709
+ new_models = ["Atla Selene 1", "SFR-LLaMA-3.1-70B-Judge"]
710
 
711
  # New models appear 40% of the time
712
  if random.random() < 0.4:
 
742
 
743
  is_prometheus_a = model_data.get(model_a, {}).get('organization') == 'Prometheus'
744
  is_prometheus_b = model_data.get(model_b, {}).get('organization') == 'Prometheus'
 
 
745
  is_flow_judge_a = model_data.get(model_a, {}).get('organization') == 'Flow AI'
746
  is_flow_judge_b = model_data.get(model_b, {}).get('organization') == 'Flow AI'
747
  is_salesforce_a = model_data.get(model_a, {}).get('organization') == 'Salesforce'
 
751
  if is_prometheus_a:
752
  score_a_val, critique_a_val = prometheus_parse_model_response(response_a)
753
  score_a_val = f"{score_a_val} / 5"
754
+ elif is_salesforce_a: # Same parser for Atla and Salesforce
755
+ score_a_val, critique_a_val = salesforce_parse_model_response(response_a)
756
  score_a_val = f"{score_a_val} / 5"
757
  elif is_flow_judge_a:
758
  score_a_val, critique_a_val = flow_judge_parse_model_response(response_a)
 
764
  if is_prometheus_b:
765
  score_b_val, critique_b_val = prometheus_parse_model_response(response_b)
766
  score_b_val = f"{score_b_val} / 5"
767
+ elif is_salesforce_b: # Same parser for Atla and Salesforce
768
+ score_b_val, critique_b_val = salesforce_parse_model_response(response_b)
769
  score_b_val = f"{score_b_val} / 5"
770
  elif is_flow_judge_b:
771
  score_b_val, critique_b_val = flow_judge_parse_model_response(response_b)