ValadisCERTH's picture
Update app.py
9fa76bc
raw
history blame
2.09 kB
from transformers import pipeline
import gradio as gr
from helper import comparatives_binding
title = "Comparatives Demo"
description = "This is a simple demo just for demonstration purposes for Serco team, to validate the results of the Natural Language module concerning comparatives identification, while in progress"
examples = [
["I want an earthquake that is located in Rome, Italy on 01/01/23 with magnitude > 6.2"],
["I want an earthquake that is located in Rome, Italy on 01/01/23 with magnitude = 6.2"],
["I want an earthquake that is located in Rome, Italy on 01/01/23 with magnitude bigger than 6.2"],
["I want an earthquake that is located in Rome, Italy on 01/01/23 with magnitude more than 6.2"],
["I want an earthquake that is located in Rome, Italy on 01/01/23 with magnitude higher than 6.2"],
["I want an earthquake that is located in Rome, Italy on 01/01/23 with magnitude smaller than 6.2"],
["I want an earthquake that is located in Rome, Italy on 01/01/23 with magnitude lesser than 6.2"],
["I want an earthquake that is located in Rome, Italy on 01/01/23 with magnitude equal to 6.2"],
["I want an earthquake that is located in Rome, Italy on 01/01/23 with magnitude equivalent to 6.2"],
["I want an earthquake that is located in Rome, Italy on 01/01/23 with magnitude surpassing 6.2"],
["I want an earthquake that is located in Rome, Italy on 01/01/23 with magnitude lagging of 6.2"],
["I want an earthquake that is located in Rome, Italy on 01/01/23 with magnitude that matches 6.2"],
["I want an earthquake that is located in Rome, Italy on 01/01/23 with magnitude that is superior of 6.2"],
["I want an earthquake that is located in Rome, Italy on 01/01/23 with magnitude that is inferior of 6.2"],
["I want an earthquake that is located in Rome, Italy on 01/01/23 with magnitude that is in line with 6.2"]
]
gr.Interface(
fn=comparatives_binding,
inputs="text",
outputs="text",
title=title,
description=description,
examples=examples,
enable_queue=True,
).launch()