File size: 1,746 Bytes
6ae15ed 9fa76bc 988bfac 44e368b 6ae15ed 988bfac 44e368b 6ae15ed 988bfac 6ae15ed | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 | 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() |