File size: 1,602 Bytes
d977e07
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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 main import main

title = "Natural Language module Demo"
description = "This is a demo for the complete Natural Language module"

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=main, 
    inputs="text", 
    outputs="text",
    title=title,
    description=description,
    examples=examples,
    enable_queue=True,
    ).launch()