elibrowne commited on
Commit
fb39ca3
1 Parent(s): 0120ad4

New commit

Browse files
Files changed (1) hide show
  1. app.py +10 -4
app.py CHANGED
@@ -37,8 +37,12 @@ q = qa_data["train"][0] # loaded question data
37
 
38
  # VARIABLES: will eventually be loaded with JSON from a dataset
39
 
 
40
  question_text = q["prompt"] + " " + q["question"]
41
  answers_text = [q["a"], q["b"], q["c"], q["d"]]
 
 
 
42
 
43
  # BLOCKS: main user interface
44
 
@@ -73,14 +77,16 @@ with gr.Blocks() as user_eval:
73
 
74
  # Scoring box
75
  with gr.Column(scale = 1) as scores:
76
- desc_1 = gr.Markdown("How **relevant** are these passages to our query?")
77
  eval_1 = gr.Slider(1, 5, step = 0.5)
78
- desc_2 = gr.Markdown("How **novel** are these passages compared to the previous passages?")
79
  eval_2 = gr.Slider(1, 5, step = 0.5)
 
 
80
  btn = gr.Button("Next")
81
 
82
- def next(eval_1, eval_2 = 0):
83
- print(eval_1 + eval_2)
84
 
85
  btn.click(fn = save_json, inputs = [eval_1, eval_2])
86
 
 
37
 
38
  # VARIABLES: will eventually be loaded with JSON from a dataset
39
 
40
+ """
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
 
 
77
 
78
  # Scoring box
79
  with gr.Column(scale = 1) as scores:
80
+ desc_1 = gr.Markdown("How **relevant** is this passage to the question?")
81
  eval_1 = gr.Slider(1, 5, step = 0.5)
82
+ desc_2 = gr.Markdown("How would you rate the passage's **quality** in terms of detail, clarity, and focus?")
83
  eval_2 = gr.Slider(1, 5, step = 0.5)
84
+ desc_3 = gr.Markdown("How effectively does the passage **lead you to the correct answer?**")
85
+ eval_3 = gr.Slider(1, 5, step = 0.5)
86
  btn = gr.Button("Next")
87
 
88
+ def next(eval_1, eval_2, eval_3):
89
+ print(eval_1 + eval_2 + eval_3)
90
 
91
  btn.click(fn = save_json, inputs = [eval_1, eval_2])
92