elibrowne commited on
Commit
c40bc82
1 Parent(s): 3a7e233

New question

Browse files
Files changed (1) hide show
  1. app.py +12 -4
app.py CHANGED
@@ -41,8 +41,9 @@ q = qa_data["train"][0] # loaded question data
41
  question_text = q["prompt"] + " " + q["question"]
42
  answers_text = [q["a"], q["b"], q["c"], q["d"]]
43
  """
44
- question_text = "Peter and Donald were in the habit of playing practical jokes on each other on their respective birthdays. On Peter's birthday, Donald sent Peter a cake containing an ingredient that he knew had, in the past, made Peter very ill. After Peter had eaten a piece of the cake, he suffered severe stomach pains and had to be taken to the hospital by ambulance. On the way to the hospital, the ambulance driver suffered a heart attack, which caused the ambulance to swerve from the road and hit a tree. As a result of the collision, Peter suffered a broken leg. In a suit by Peter against Donald to recover damages for Peter's broken leg, Peter will "
45
- answers_text = ["prevail, because Donald knew that the cake would be harmful or offensive to Peter.", "prevail, only if the ambulance driver was negligent.", "not prevail, because Donald could not reasonably be expected to foresee injury to Peter's leg.", "not prevail, because the ambulance driver's heart attack was a superseding cause of Peter's broken leg."]
 
46
 
47
  # BLOCKS: main user interface
48
 
@@ -57,12 +58,19 @@ with gr.Blocks() as user_eval:
57
  with gr.Row(equal_height = False, visible = False) as evals:
58
  # Passage text
59
  with gr.Column(scale = 2) as passages:
 
60
  passage_display = gr.Markdown("""
61
  ### Question and Answer
62
  """ + question_text +
 
 
 
 
 
 
 
 
63
  """
64
- **""" + q["answer"] +
65
- """**
66
  ### Relevant Passages
67
  - Dataset 1
68
  - Dataset 2
 
41
  question_text = q["prompt"] + " " + q["question"]
42
  answers_text = [q["a"], q["b"], q["c"], q["d"]]
43
  """
44
+ question_text = "An act of Congress provides that \"no federal court shall order the implementation of a public school desegregation plan that would require the transportation of any student to a school other than the school closest or next closest to his place of residence.\" Which of the following is the strongest argument for the constitutionality of the act?"
45
+ answers_text = ["The Fourteenth Amendment authorizes Congress to define governmental conduct which violates the equal protection clause.", "Under Article III, Congress may restrict the jurisdiction of the federal courts.", "Transportation of students is subject to regulation by Congress because commerce is involved.", "Congress provides partial support for public education and is therefore entitled to establish conditions upon the expenditure of federal grants."]
46
+ answer_id = 1
47
 
48
  # BLOCKS: main user interface
49
 
 
58
  with gr.Row(equal_height = False, visible = False) as evals:
59
  # Passage text
60
  with gr.Column(scale = 2) as passages:
61
+ answers_text[answer_id] = "**" + answers_text[answer_id] + "**"
62
  passage_display = gr.Markdown("""
63
  ### Question and Answer
64
  """ + question_text +
65
+ """ \n
66
+ """ + answers_text[0] +
67
+ """ \n
68
+ """ + answers_text[1] +
69
+ """ \n
70
+ """ + answers_text[2] +
71
+ """ \n
72
+ """ + answers_text[3] +
73
  """
 
 
74
  ### Relevant Passages
75
  - Dataset 1
76
  - Dataset 2