Q-bert commited on
Commit
d12c61c
1 Parent(s): 61261dd

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -5
app.py CHANGED
@@ -11,9 +11,9 @@ HF_TOKEN = os.getenv('HF_TOKEN')
11
  login(token=HF_TOKEN)
12
 
13
 
14
- dataset_1 = load_dataset("Q-bert/LlamaPair")["train"]
15
- dataset_2 = load_dataset("Q-bert/QwenPair")["train"]
16
- dataset_3 = load_dataset("Q-bert/MistralPair")["train"]
17
 
18
  df_log = pd.DataFrame(columns=["instruction", "selected_model", "pair", "submission_time"])
19
 
@@ -46,7 +46,7 @@ def format_response_html(response):
46
 
47
  def submit_choice(selected_response, instruction, label_1, label_2, pair_name):
48
  try:
49
- df_log = pd.DataFrame(load_dataset("Q-bert/log")["train"])
50
  except:
51
  df_log = pd.DataFrame(columns=["instruction", "selected_model",
52
  "pair", "submission_time"])
@@ -64,7 +64,7 @@ def submit_choice(selected_response, instruction, label_1, label_2, pair_name):
64
  df_log = pd.concat([df_log, new_entry], ignore_index=True)
65
  df_log.to_csv("annotations_log.csv", index=False)
66
  log = Dataset.from_pandas(df_log)
67
- log.push_to_hub("Q-bert/log")
68
 
69
  new_instruction, new_response_1, new_response_2, new_label_1, new_label_2, new_pair_name = get_random_row()
70
 
 
11
  login(token=HF_TOKEN)
12
 
13
 
14
+ dataset_1 = load_dataset("HumanLLMs/LlamaPair")["train"]
15
+ dataset_2 = load_dataset("HumanLLMs/QwenPair")["train"]
16
+ dataset_3 = load_dataset("HumanLLMs/MistralPair")["train"]
17
 
18
  df_log = pd.DataFrame(columns=["instruction", "selected_model", "pair", "submission_time"])
19
 
 
46
 
47
  def submit_choice(selected_response, instruction, label_1, label_2, pair_name):
48
  try:
49
+ df_log = pd.DataFrame(load_dataset("HumanLLMs/log")["train"])
50
  except:
51
  df_log = pd.DataFrame(columns=["instruction", "selected_model",
52
  "pair", "submission_time"])
 
64
  df_log = pd.concat([df_log, new_entry], ignore_index=True)
65
  df_log.to_csv("annotations_log.csv", index=False)
66
  log = Dataset.from_pandas(df_log)
67
+ log.push_to_hub("HumanLLMs/log")
68
 
69
  new_instruction, new_response_1, new_response_2, new_label_1, new_label_2, new_pair_name = get_random_row()
70