ValadisCERTH's picture
Update app.py
44e368b
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 first results of the Natural Language module concerning the identification of comparatives"
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 6.2"],
["I want an earthquake that is located in Rome, Italy on 01/01/23 with magnitude that matches 6.2"]
]
gr.Interface(
fn=comparatives_binding,
inputs="text",
outputs="text",
title=title,
description=description,
examples=examples,
enable_queue=True,
).launch()