Spaces:
Sleeping
Sleeping
elibrowne
commited on
Commit
·
f4facc1
1
Parent(s):
028b757
Changing to HTML: more edits
Browse files
app.py
CHANGED
|
@@ -77,24 +77,24 @@ with gr.Blocks() as user_eval:
|
|
| 77 |
# Passage text
|
| 78 |
with gr.Column(scale = 2) as passages:
|
| 79 |
selection = gr.HTML("""
|
| 80 |
-
<
|
| 81 |
""" + passage_texts[0])
|
| 82 |
line = gr.Markdown("---")
|
| 83 |
answers_text[answer_id] = "**" + answers_text[answer_id] + "**"
|
| 84 |
passage_display = gr.Markdown("""
|
| 85 |
-
|
| 86 |
*""" + question_text +
|
| 87 |
"""* \n
|
| 88 |
-
""" + answers_text[0] +
|
| 89 |
""" \n
|
| 90 |
-
""" + answers_text[1] +
|
| 91 |
""" \n
|
| 92 |
-
""" + answers_text[2] +
|
| 93 |
""" \n
|
| 94 |
-
""" + answers_text[3])
|
| 95 |
|
| 96 |
# Scoring box
|
| 97 |
-
with gr.Column(scale = 1) as
|
| 98 |
desc_0 = gr.Markdown("Does the passage describe **a legal rule?**")
|
| 99 |
eval_0 = gr.Radio(["Yes", "No"], label = "Some passages in our dataset include background details or stories that don't contain any meaningful legal information.")
|
| 100 |
desc_1 = gr.Markdown("How **relevant** is this passage to the question?")
|
|
@@ -103,7 +103,11 @@ with gr.Blocks() as user_eval:
|
|
| 103 |
eval_2 = gr.Slider(1, 5, step = 0.5, label = "Is it comprehensible? Is it thorough? Can it stand on its own?")
|
| 104 |
desc_3 = gr.Markdown("How effectively does the passage **lead you to the correct answer?**")
|
| 105 |
eval_3 = gr.Slider(1, 5, step = 0.5, label = "All things considered, does this passage help a user answer the question correctly?")
|
| 106 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 107 |
|
| 108 |
def next(eval_1, eval_2, eval_3):
|
| 109 |
global step
|
|
|
|
| 77 |
# Passage text
|
| 78 |
with gr.Column(scale = 2) as passages:
|
| 79 |
selection = gr.HTML("""
|
| 80 |
+
<h2> Retrieved Passage <h2>
|
| 81 |
""" + passage_texts[0])
|
| 82 |
line = gr.Markdown("---")
|
| 83 |
answers_text[answer_id] = "**" + answers_text[answer_id] + "**"
|
| 84 |
passage_display = gr.Markdown("""
|
| 85 |
+
## Question and Answer
|
| 86 |
*""" + question_text +
|
| 87 |
"""* \n
|
| 88 |
+
+ """ + answers_text[0] +
|
| 89 |
""" \n
|
| 90 |
+
+ """ + answers_text[1] +
|
| 91 |
""" \n
|
| 92 |
+
+ """ + answers_text[2] +
|
| 93 |
""" \n
|
| 94 |
+
+ """ + answers_text[3])
|
| 95 |
|
| 96 |
# Scoring box
|
| 97 |
+
with gr.Column(scale = 1) as scores_p:
|
| 98 |
desc_0 = gr.Markdown("Does the passage describe **a legal rule?**")
|
| 99 |
eval_0 = gr.Radio(["Yes", "No"], label = "Some passages in our dataset include background details or stories that don't contain any meaningful legal information.")
|
| 100 |
desc_1 = gr.Markdown("How **relevant** is this passage to the question?")
|
|
|
|
| 103 |
eval_2 = gr.Slider(1, 5, step = 0.5, label = "Is it comprehensible? Is it thorough? Can it stand on its own?")
|
| 104 |
desc_3 = gr.Markdown("How effectively does the passage **lead you to the correct answer?**")
|
| 105 |
eval_3 = gr.Slider(1, 5, step = 0.5, label = "All things considered, does this passage help a user answer the question correctly?")
|
| 106 |
+
btn_p = gr.Button("Next")
|
| 107 |
+
|
| 108 |
+
with gr.Column(scale = 1, visible = False) as scores_g:
|
| 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
|