Spaces:
Runtime error
Runtime error
ValadisCERTH
commited on
Commit
·
d977e07
1
Parent(s):
4c932e4
Create app.py
Browse files
app.py
ADDED
@@ -0,0 +1,33 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
from transformers import pipeline
|
2 |
+
import gradio as gr
|
3 |
+
|
4 |
+
from main import main
|
5 |
+
|
6 |
+
title = "Natural Language module Demo"
|
7 |
+
description = "This is a demo for the complete Natural Language module"
|
8 |
+
|
9 |
+
examples = [
|
10 |
+
["I want an earthquake that is located in Rome, Italy on 01/01/23 with magnitude > 6.2"],
|
11 |
+
["I want an earthquake that is located in Rome, Italy on 01/01/23 with magnitude = 6.2"],
|
12 |
+
["I want an earthquake that is located in Rome, Italy on 01/01/23 with magnitude bigger than 6.2"],
|
13 |
+
["I want an earthquake that is located in Rome, Italy on 01/01/23 with magnitude more than 6.2"],
|
14 |
+
["I want an earthquake that is located in Rome, Italy on 01/01/23 with magnitude higher than 6.2"],
|
15 |
+
["I want an earthquake that is located in Rome, Italy on 01/01/23 with magnitude smaller than 6.2"],
|
16 |
+
["I want an earthquake that is located in Rome, Italy on 01/01/23 with magnitude lesser than 6.2"],
|
17 |
+
["I want an earthquake that is located in Rome, Italy on 01/01/23 with magnitude equal to 6.2"],
|
18 |
+
["I want an earthquake that is located in Rome, Italy on 01/01/23 with magnitude equivalent to 6.2"],
|
19 |
+
["I want an earthquake that is located in Rome, Italy on 01/01/23 with magnitude surpassing 6.2"],
|
20 |
+
["I want an earthquake that is located in Rome, Italy on 01/01/23 with magnitude lagging 6.2"],
|
21 |
+
["I want an earthquake that is located in Rome, Italy on 01/01/23 with magnitude that matches 6.2"]
|
22 |
+
]
|
23 |
+
|
24 |
+
|
25 |
+
gr.Interface(
|
26 |
+
fn=main,
|
27 |
+
inputs="text",
|
28 |
+
outputs="text",
|
29 |
+
title=title,
|
30 |
+
description=description,
|
31 |
+
examples=examples,
|
32 |
+
enable_queue=True,
|
33 |
+
).launch()
|