Spaces:
Sleeping
Sleeping
Johannes
commited on
Commit
·
8c6583b
1
Parent(s):
df60fb6
updates again
Browse files- app.py +1 -1
- example_strings.py +2 -2
app.py
CHANGED
|
@@ -37,7 +37,7 @@ description = """The NSQL model family was published by [Numbers Station](https:
|
|
| 37 |
- [nsql-2B](https://huggingface.co/NumbersStation/nsql-2B)
|
| 38 |
- [nsql-350M]((https://huggingface.co/NumbersStation/nsql-350M))
|
| 39 |
|
| 40 |
-
|
| 41 |
|
| 42 |
In general you should first provide the table schemas of the tables you have questions about and then prompt it with a natural language question.
|
| 43 |
The model will then generate a SQL query that you can run against your database.
|
|
|
|
| 37 |
- [nsql-2B](https://huggingface.co/NumbersStation/nsql-2B)
|
| 38 |
- [nsql-350M]((https://huggingface.co/NumbersStation/nsql-350M))
|
| 39 |
|
| 40 |
+
This demo let's you choose which one you want to use and provides the three examples you can also find in their model cards.
|
| 41 |
|
| 42 |
In general you should first provide the table schemas of the tables you have questions about and then prompt it with a natural language question.
|
| 43 |
The model will then generate a SQL query that you can run against your database.
|
example_strings.py
CHANGED
|
@@ -32,7 +32,7 @@ CREATE TABLE singer_in_concert (
|
|
| 32 |
)""",
|
| 33 |
"Using valid SQLite, answer the following questions for the tables provided above.",
|
| 34 |
"What is the maximum, the average, and the minimum capacity of stadiums ?",
|
| 35 |
-
"nsql-
|
| 36 |
|
| 37 |
example2 = ["""CREATE TABLE stadium (
|
| 38 |
stadium_id number,
|
|
@@ -42,7 +42,7 @@ example2 = ["""CREATE TABLE stadium (
|
|
| 42 |
)""",
|
| 43 |
"Using valid SQLite, answer the following questions for the tables provided above.",
|
| 44 |
"how many stadiums in total?",
|
| 45 |
-
"nsql-
|
| 46 |
|
| 47 |
example3 = ["""CREATE TABLE work_orders (
|
| 48 |
ID NUMBER,
|
|
|
|
| 32 |
)""",
|
| 33 |
"Using valid SQLite, answer the following questions for the tables provided above.",
|
| 34 |
"What is the maximum, the average, and the minimum capacity of stadiums ?",
|
| 35 |
+
"nsql-6B"]
|
| 36 |
|
| 37 |
example2 = ["""CREATE TABLE stadium (
|
| 38 |
stadium_id number,
|
|
|
|
| 42 |
)""",
|
| 43 |
"Using valid SQLite, answer the following questions for the tables provided above.",
|
| 44 |
"how many stadiums in total?",
|
| 45 |
+
"nsql-2B"]
|
| 46 |
|
| 47 |
example3 = ["""CREATE TABLE work_orders (
|
| 48 |
ID NUMBER,
|