Heiko Hotz commited on
Commit
ea00796
1 Parent(s): 3d8edaf

initial commit

Browse files
Files changed (1) hide show
  1. app.py +7 -9
app.py CHANGED
@@ -31,18 +31,16 @@ from torch.utils.data import DataLoader, RandomSampler, SequentialSampler
31
  st.set_page_config(layout="wide")
32
  st.cache(show_spinner=False, persist=True)
33
 
34
- with open('./contract.txt', 'w') as f:
35
- f.write("Hello")
36
-
37
 
38
  def load_questions():
39
- with open('data/test.json') as json_file:
40
- data = json.load(json_file)
41
-
42
  questions = []
43
- for i, q in enumerate(data['data'][0]['paragraphs'][0]['qas']):
44
- question = data['data'][0]['paragraphs'][0]['qas'][i]['question']
45
- questions.append(question)
 
 
 
 
46
  return questions
47
 
48
 
 
31
  st.set_page_config(layout="wide")
32
  st.cache(show_spinner=False, persist=True)
33
 
 
 
 
34
 
35
  def load_questions():
 
 
 
36
  questions = []
37
+ with open('data/questions.txt') as f:
38
+ questions = f.readlines()
39
+
40
+ # questions = []
41
+ # for i, q in enumerate(data['data'][0]['paragraphs'][0]['qas']):
42
+ # question = data['data'][0]['paragraphs'][0]['qas'][i]['question']
43
+ # questions.append(question)
44
  return questions
45
 
46