File size: 958 Bytes
3347c60
 
 
25c1bd1
 
6be438e
 
3347c60
 
6be438e
 
 
 
3347c60
 
 
 
 
 
 
 
 
 
 
 
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
from transformers import pipeline
import gradio as gr

from helper import identify_earthquake_event

title = "Earthquaqe events Demo"
description = "This is a simple demo just for demonstration purposes for Serco team, to validate the results of the Natural Language module concerning the identification of earthquaqe events, while in progress"

examples = [
    ["I want all earthquakes that are located in Italy, in 01/01/23 with magnitude greater than 6.2"],
    ["I want all seisms that are located in Italy, in 01/01/23 with magnitude greater than 6.2"],
    ["I want all earth shakes that are located in Italy, in 01/01/23 with magnitude greater than 6.2"],
    ["I want all bars that are located in Italy, in 01/01/23 with magnitude greater than 6.2"],
]


gr.Interface(
    fn=identify_earthquake_event, 
    inputs="text",
    outputs="text",
    title=title,
    description=description,
    examples=examples,
    enable_queue=True,
    ).launch()