Spaces:
Sleeping
Sleeping
elibrowne
commited on
Commit
·
c40bc82
1
Parent(s):
3a7e233
New question
Browse files
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 = "
|
45 |
-
answers_text = ["
|
|
|
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
|