Update app.py
Browse files
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/
|
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["
|
45 |
-
completions = [row["
|
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)
|