Spaces:
Build error
Build error
Commit
·
a1f4642
1
Parent(s):
94a59f6
Bug fix
Browse files
app.py
CHANGED
|
@@ -123,18 +123,18 @@ examples = [
|
|
| 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.
|
| 127 |
choices=examples,
|
| 128 |
label='Question:',
|
| 129 |
-
|
| 130 |
)
|
| 131 |
-
input_kg_model = gr.
|
| 132 |
-
input_qa_model = gr.
|
| 133 |
-
input_max_input_len = gr.
|
| 134 |
-
input_max_output_len = gr.
|
| 135 |
-
input_m = gr.
|
| 136 |
-
input_top_p = gr.
|
| 137 |
-
output_text = gr.
|
| 138 |
|
| 139 |
gr.Interface(
|
| 140 |
fn=predict,
|
|
|
|
| 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.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.Textbox(label='Knowledge generation model:', value='liujch1998/rainier-large', interactive=False)
|
| 132 |
+
input_qa_model = gr.Textbox(label='QA model:', value='allenai/unifiedqa-t5-large', interactive=False)
|
| 133 |
+
input_max_input_len = gr.Number(label='Max question length:', value=256, precision=0)
|
| 134 |
+
input_max_output_len = gr.Number(label='Max knowledge length:', value=32, precision=0)
|
| 135 |
+
input_m = gr.Slider(label='Number of generated knowledges:', value=10, mininum=1, maximum=20, step=1)
|
| 136 |
+
input_top_p = gr.Slider(label='Top_p for knowledge generation:', value=0.5, mininum=0.0, maximum=1.0, step=0.05)
|
| 137 |
+
output_text = gr.Textbox(label='Output', interactive=False)
|
| 138 |
|
| 139 |
gr.Interface(
|
| 140 |
fn=predict,
|