JRQi commited on
Commit
97d7261
1 Parent(s): 706d8ee

Update game3.py

Browse files
Files changed (1) hide show
  1. game3.py +5 -9
game3.py CHANGED
@@ -5,11 +5,8 @@ import pandas as pd
5
  import gradio as gr
6
  import numpy as np
7
 
8
- def read3(lang, num_selected_former):
9
- if lang in ['en']:
10
- fname = 'data1_en.txt'
11
- else:
12
- fname = 'data1_nl_10.txt'
13
  with open(fname, encoding='utf-8') as f:
14
  content = f.readlines()
15
  index_selected = random.randint(0,len(content)/2-1)
@@ -17,10 +14,9 @@ def read3(lang, num_selected_former):
17
  index_selected = random.randint(0,len(content)/2-1)
18
  text = eval(content[index_selected*2])
19
  interpretation = eval(content[int(index_selected*2+1)])
20
- if lang == 'en':
21
- min_len = 4
22
- else:
23
- min_len = 2
24
  tokens = [i[0] for i in interpretation]
25
  tokens = tokens[1:-1]
26
  while len(tokens) <= min_len or '\\' in text['text'] or '//' in text['text']:
 
5
  import gradio as gr
6
  import numpy as np
7
 
8
+ def read3(num_selected_former):
9
+ fname = 'data3_convai2_inferred.txt'
 
 
 
10
  with open(fname, encoding='utf-8') as f:
11
  content = f.readlines()
12
  index_selected = random.randint(0,len(content)/2-1)
 
14
  index_selected = random.randint(0,len(content)/2-1)
15
  text = eval(content[index_selected*2])
16
  interpretation = eval(content[int(index_selected*2+1)])
17
+
18
+ min_len = 5
19
+
 
20
  tokens = [i[0] for i in interpretation]
21
  tokens = tokens[1:-1]
22
  while len(tokens) <= min_len or '\\' in text['text'] or '//' in text['text']: