Q-bert commited on
Commit
81ced9c
1 Parent(s): bfb0da9

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -1
app.py CHANGED
@@ -17,6 +17,9 @@ dataset_3 = load_dataset("HumanLLMs/MistralPair")["train"]
17
 
18
  df_log = pd.DataFrame(columns=["instruction", "selected_model", "pair", "submission_time"])
19
 
 
 
 
20
  def get_random_row():
21
  selected_dataset = random.choice([dataset_1, dataset_2, dataset_3])
22
  pair_name = ("LlamaPair" if selected_dataset == dataset_1
@@ -32,7 +35,7 @@ def get_random_row():
32
  ("Official Model", response_official)]
33
  random.shuffle(responses)
34
 
35
- return (instruction, responses[0][1], responses[1][1],
36
  responses[0][0], responses[1][0], pair_name)
37
 
38
  def format_response_1_html(response):
 
17
 
18
  df_log = pd.DataFrame(columns=["instruction", "selected_model", "pair", "submission_time"])
19
 
20
+ def remove_emojis(text):
21
+ return text.encode('ascii', 'ignore').decode('ascii')
22
+
23
  def get_random_row():
24
  selected_dataset = random.choice([dataset_1, dataset_2, dataset_3])
25
  pair_name = ("LlamaPair" if selected_dataset == dataset_1
 
35
  ("Official Model", response_official)]
36
  random.shuffle(responses)
37
 
38
+ return (instruction, remove_emojis(responses[0][1]), remove_emojis(responses[1][1]),
39
  responses[0][0], responses[1][0], pair_name)
40
 
41
  def format_response_1_html(response):