Spaces:
Runtime error
Runtime error
Better UI hints
Browse files
app.py
CHANGED
@@ -8,7 +8,7 @@ title="QANom Parser Demo"
|
|
8 |
examples = [["The doctor was interested in Luke 's <p> treatment .", True, "treat"],
|
9 |
["The Veterinary student was interested in Luke 's <p> treatment of sea animals .", True, "treat"]]
|
10 |
input_sent_box_label = "Insert sentence here. Mark the predicate by adding the token '<p>' before it."
|
11 |
-
|
12 |
links = """<p style='text-align: center'>
|
13 |
<a href='https://www.qasrl.org' target='_blank'>QASRL Website</a> | <a href='https://huggingface.co/spaces/kleinay/qanom-seq2seq-demo' target='_blank'>Model Repo at Huggingface Hub</a>
|
14 |
</p>"""
|
@@ -33,7 +33,7 @@ def call(sentence, is_nominal, verb_form):
|
|
33 |
iface = gr.Interface(fn=call,
|
34 |
inputs=[gr.inputs.Textbox(placeholder=input_sent_box_label, label="Sentence", lines=4),
|
35 |
gr.inputs.Checkbox(default=True, label="Is Nominalization?"),
|
36 |
-
gr.inputs.Textbox(label="
|
37 |
outputs=gr.outputs.JSON(label="Model Output - QASRL"),
|
38 |
title=title,
|
39 |
description=description,
|
|
|
8 |
examples = [["The doctor was interested in Luke 's <p> treatment .", True, "treat"],
|
9 |
["The Veterinary student was interested in Luke 's <p> treatment of sea animals .", True, "treat"]]
|
10 |
input_sent_box_label = "Insert sentence here. Mark the predicate by adding the token '<p>' before it."
|
11 |
+
verb_form_inp_placeholder = "e.g. 'decide' for the nominalization 'decision', 'teach' for 'teacher', etc."
|
12 |
links = """<p style='text-align: center'>
|
13 |
<a href='https://www.qasrl.org' target='_blank'>QASRL Website</a> | <a href='https://huggingface.co/spaces/kleinay/qanom-seq2seq-demo' target='_blank'>Model Repo at Huggingface Hub</a>
|
14 |
</p>"""
|
|
|
33 |
iface = gr.Interface(fn=call,
|
34 |
inputs=[gr.inputs.Textbox(placeholder=input_sent_box_label, label="Sentence", lines=4),
|
35 |
gr.inputs.Checkbox(default=True, label="Is Nominalization?"),
|
36 |
+
gr.inputs.Textbox(placeholder=verb_form_inp_placeholder, label="Verbal form (for nominalizations)", default='')],
|
37 |
outputs=gr.outputs.JSON(label="Model Output - QASRL"),
|
38 |
title=title,
|
39 |
description=description,
|