File size: 1,243 Bytes
8b8065a
 
 
d2baa14
 
4ae82fa
 
8b8065a
 
73e6a6e
dae7a0c
0c11d9f
dae7a0c
 
0c11d9f
8b8065a
 
 
 
 
 
 
 
 
400d641
8b8065a
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
from transformers import pipeline
import gradio as gr

from helper import identify_locations

title = "Countries/Cities Identification Demo"
description = "This is a simple demo just for demonstration purposes for the Serco team, to validate the first results of the Natural Language module concerning the identification of countries and cities"

examples = [
    ["I want an earthquake that is located in Rome, Italy in 01/01/23 with magnitude greater than 6.2"],
    ["I want an earthquake that is located in Buenos Aires, Argentina in 01/01/23 with magnitude greater than 6.2"],
    ["I want an earthquake that is located in United Arab Emirates in 01/01/23 with magnitude greater than 6.2"],
    ["I want an earthquake that is located in Ishkashim, Tajikistan, in 01/01/23 with magnitude greater than 6.2"],
    ["I want an earthquake that is located in Burkina Faso in 01/01/23 with magnitude greater than 6.2."],
    ["I want an earthquake that is located in Dibba Al-Fujairah, United Arab Emirates in 01/01/23 with magnitude greater than 6.2"],
]

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