davidberenstein1957 HF staff commited on
Commit
744da58
·
verified ·
1 Parent(s): 9243d47

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -12,7 +12,7 @@ MODEL_IDS = [
12
  ]
13
  CLIENTS = [InferenceClient(model_id, token=os.environ["HF_TOKEN"]) for model_id in MODEL_IDS]
14
 
15
- dataset = load_dataset("argilla/magpie-ultra-v0.1", split="train")
16
 
17
 
18
  def get_response(messages):
@@ -41,8 +41,8 @@ def get_response(messages):
41
  def next_input(_prompt, _completion_a, _completion_b):
42
  new_dataset = dataset.shuffle()
43
  row = new_dataset[0]
44
- messages = row["messages"][:-1]
45
- completions = [row["response"]]
46
  completions.append(get_response(messages))
47
  completions.append(get_response(messages))
48
  random.shuffle(completions)
 
12
  ]
13
  CLIENTS = [InferenceClient(model_id, token=os.environ["HF_TOKEN"]) for model_id in MODEL_IDS]
14
 
15
+ dataset = load_dataset("argilla/distilabel-capybara-dpo-7k-binarized", split="train")
16
 
17
 
18
  def get_response(messages):
 
41
  def next_input(_prompt, _completion_a, _completion_b):
42
  new_dataset = dataset.shuffle()
43
  row = new_dataset[0]
44
+ messages = row["chosen"][:-1]
45
+ completions = [row["chosen"][-1]["content"]]
46
  completions.append(get_response(messages))
47
  completions.append(get_response(messages))
48
  random.shuffle(completions)