Spaces:
Sleeping
Sleeping
elibrowne
commited on
Commit
·
796ea23
1
Parent(s):
1364370
Changing to HTML: more edits
Browse files
app.py
CHANGED
@@ -109,22 +109,22 @@ with gr.Blocks() as user_eval:
|
|
109 |
satisfied = gr.Markdown("How satisfied are you by this answer?")
|
110 |
eval_satisfied = gr.Slider(1, 5, step = 0.5, label = "Would someone answering the question find value in these responses?")
|
111 |
|
112 |
-
|
113 |
-
|
114 |
-
|
115 |
-
|
116 |
-
|
117 |
-
|
118 |
-
|
119 |
-
|
120 |
-
|
121 |
-
|
122 |
-
|
123 |
-
|
124 |
-
|
125 |
-
|
126 |
-
|
127 |
-
|
128 |
|
129 |
# Question and answering dynamics
|
130 |
with gr.Row(equal_height = False, visible = False) as question:
|
|
|
109 |
satisfied = gr.Markdown("How satisfied are you by this answer?")
|
110 |
eval_satisfied = gr.Slider(1, 5, step = 0.5, label = "Would someone answering the question find value in these responses?")
|
111 |
|
112 |
+
def next(eval_1, eval_2, eval_3):
|
113 |
+
global step
|
114 |
+
step += 1
|
115 |
+
print(eval_1 + eval_2 + eval_3)
|
116 |
+
if step == len(passage_texts):
|
117 |
+
return {
|
118 |
+
selection: gr.Markdown("Done!")
|
119 |
+
}
|
120 |
+
else:
|
121 |
+
return {
|
122 |
+
selection: gr.HTML("""
|
123 |
+
<h2> Retrieved Passage </h2>
|
124 |
+
""" + passage_texts[step])
|
125 |
+
}
|
126 |
+
|
127 |
+
btn_p.click(fn = next, inputs = [eval_1, eval_2, eval_3], outputs = [selection])
|
128 |
|
129 |
# Question and answering dynamics
|
130 |
with gr.Row(equal_height = False, visible = False) as question:
|