Spaces:
Runtime error
Runtime error
add qasrl baseline model
Browse files
app.py
CHANGED
|
@@ -2,15 +2,17 @@ import gradio as gr
|
|
| 2 |
from qasrl_model_pipeline import QASRL_Pipeline
|
| 3 |
|
| 4 |
models = ["kleinay/qanom-seq2seq-model-baseline",
|
| 5 |
-
"kleinay/qanom-seq2seq-model-joint"
|
|
|
|
| 6 |
pipelines = {model: QASRL_Pipeline(model) for model in models}
|
| 7 |
|
| 8 |
|
| 9 |
description = f"""This is a demo of QASRL/QANom models, which fine-tuned a Seq2Seq pretrained model (T5) on the QASRL/QANom tasks."""
|
| 10 |
-
title="QANom Parser Demo"
|
| 11 |
examples = [[models[0], "The doctor was interested in Luke 's <p> treatment .", True, "treat"],
|
| 12 |
[models[1], "The doctor was interested to know about Luke 's bio-feedback <p> treatment given by the nurse yesterday.", True, "treat"],
|
| 13 |
-
[models[
|
|
|
|
| 14 |
[models[1], "The Veterinary student was <p> interested in Luke 's treatment of sea animals .", False, "interest"]]
|
| 15 |
|
| 16 |
input_sent_box_label = "Insert sentence here. Mark the predicate by adding the token '<p>' before it."
|
|
|
|
| 2 |
from qasrl_model_pipeline import QASRL_Pipeline
|
| 3 |
|
| 4 |
models = ["kleinay/qanom-seq2seq-model-baseline",
|
| 5 |
+
"kleinay/qanom-seq2seq-model-joint",
|
| 6 |
+
"kleinay/qasrl-seq2seq-model"]
|
| 7 |
pipelines = {model: QASRL_Pipeline(model) for model in models}
|
| 8 |
|
| 9 |
|
| 10 |
description = f"""This is a demo of QASRL/QANom models, which fine-tuned a Seq2Seq pretrained model (T5) on the QASRL/QANom tasks."""
|
| 11 |
+
title="QANom/QASRL Parser Demo"
|
| 12 |
examples = [[models[0], "The doctor was interested in Luke 's <p> treatment .", True, "treat"],
|
| 13 |
[models[1], "The doctor was interested to know about Luke 's bio-feedback <p> treatment given by the nurse yesterday.", True, "treat"],
|
| 14 |
+
[models[2], "The doctor was interested to <p> know about Luke 's bio-feedback treatment given by the nurse yesterday.", False, "know"],
|
| 15 |
+
[models[1], "The Veterinary student was interested in Luke 's <p> treatment of sea animals .", True, "treat"],
|
| 16 |
[models[1], "The Veterinary student was <p> interested in Luke 's treatment of sea animals .", False, "interest"]]
|
| 17 |
|
| 18 |
input_sent_box_label = "Insert sentence here. Mark the predicate by adding the token '<p>' before it."
|