ValadisCERTH's picture
Update app.py
3f018ec
from transformers import pipeline
import gradio as gr
from helper import magnitude_binding
title = "Magnitudes Identification Demo"
description = "This is a simple demo just for demonstration purposes, so that Serco team might have the chance to validate the first results of the Natural Language module concerning the identification of magnitude numbers \n\n NOTE: DO NOT ENTER DATES FOR THIS TESTING"
examples = [
["I want all earthquakes that are located in Ishkoshim, Tajikistan with a magnitude greater than 6"],
["I want all earthquakes that are located in Ishkoshim, Tajikistan with a magnitude greater than 6.5"],
["I want all earthquakes that are located in Ishkoshim, Tajikistan with a magnitude greater than six"],
["I want all earthquakes that are located in Ishkoshim, Tajikistan with a magnitude greater than six point five"],
["I want all earthquakes that are located in Ishkoshim, Tajikistan with a magnitude greater than 6 point five"],
["I want all earthquakes that are located in Ishkoshim, Tajikistan with a magnitude greater than six point 5"],
["I want all earthquakes that are located in Ishkoshim, Tajikistan with a magnitude greater than 6 point 5"],
]
gr.Interface(
fn=magnitude_binding,
inputs="text",
outputs="text",
title=title,
description=description,
examples=examples,
enable_queue=True,
).launch()