Spaces:
Sleeping
Sleeping
Commit
·
94a59f6
1
Parent(s):
0f3e715
Bug fix
Browse files
app.py
CHANGED
@@ -114,17 +114,19 @@ def predict(question, kg_model, qa_model, max_input_len, max_output_len, m, top_
|
|
114 |
output += f'Knowledge selected to make the prediction: {result["selected_knowledge"]}\n'
|
115 |
return output
|
116 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
117 |
input_question = gr.inputs.Dropdown(
|
118 |
-
choices=
|
119 |
-
'If the mass of an object gets bigger what will happen to the amount of matter contained within it? \\n (A) gets bigger (B) gets smaller',
|
120 |
-
'What would vinyl be an odd thing to replace? \\n (A) pants (B) record albums (C) record store (D) cheese (E) wallpaper',
|
121 |
-
'Some pelycosaurs gave rise to reptile ancestral to \\n (A) lamphreys (B) angiosperm (C) mammals (D) paramecium (E) animals (F) protozoa (G) arachnids (H) backbones',
|
122 |
-
'Sydney rubbed Addison’s head because she had a horrible headache. What will happen to Sydney? \\n (A) drift to sleep (B) receive thanks (C) be reprimanded',
|
123 |
-
'Adam always spent all of the free time watching Tv unlike Hunter who volunteered, due to _ being lazy. \\n (A) Adam (B) Hunter',
|
124 |
-
'Causes bad breath and frightens blood-suckers \\n (A) tuna (B) iron (C) trash (D) garlic (E) pubs',
|
125 |
-
],
|
126 |
label='Question:',
|
127 |
-
info='A multiple-choice commonsense question. Please follow the UnifiedQA input format: "{question} \\n (A) ... (B) ... (C) ..."',
|
128 |
)
|
129 |
input_kg_model = gr.inputs.Textbox(label='Knowledge generation model:', value='liujch1998/rainier-large', interactive=False)
|
130 |
input_qa_model = gr.inputs.Textbox(label='QA model:', value='allenai/unifiedqa-t5-large', interactive=False)
|
|
|
114 |
output += f'Knowledge selected to make the prediction: {result["selected_knowledge"]}\n'
|
115 |
return output
|
116 |
|
117 |
+
examples = [
|
118 |
+
'If the mass of an object gets bigger what will happen to the amount of matter contained within it? \\n (A) gets bigger (B) gets smaller',
|
119 |
+
'What would vinyl be an odd thing to replace? \\n (A) pants (B) record albums (C) record store (D) cheese (E) wallpaper',
|
120 |
+
'Some pelycosaurs gave rise to reptile ancestral to \\n (A) lamphreys (B) angiosperm (C) mammals (D) paramecium (E) animals (F) protozoa (G) arachnids (H) backbones',
|
121 |
+
'Sydney rubbed Addison’s head because she had a horrible headache. What will happen to Sydney? \\n (A) drift to sleep (B) receive thanks (C) be reprimanded',
|
122 |
+
'Adam always spent all of the free time watching Tv unlike Hunter who volunteered, due to _ being lazy. \\n (A) Adam (B) Hunter',
|
123 |
+
'Causes bad breath and frightens blood-suckers \\n (A) tuna (B) iron (C) trash (D) garlic (E) pubs',
|
124 |
+
]
|
125 |
+
|
126 |
input_question = gr.inputs.Dropdown(
|
127 |
+
choices=examples,
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
128 |
label='Question:',
|
129 |
+
# info='A multiple-choice commonsense question. Please follow the UnifiedQA input format: "{question} \\n (A) ... (B) ... (C) ..."',
|
130 |
)
|
131 |
input_kg_model = gr.inputs.Textbox(label='Knowledge generation model:', value='liujch1998/rainier-large', interactive=False)
|
132 |
input_qa_model = gr.inputs.Textbox(label='QA model:', value='allenai/unifiedqa-t5-large', interactive=False)
|