Johannes commited on
Commit
d3924a8
1 Parent(s): 832b5f4
Files changed (2) hide show
  1. app.py +2 -2
  2. 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
- This demo let's you choose from the 6B and 350M model 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.
@@ -50,7 +50,7 @@ iface = gr.Interface(
50
  inputs=[gr.Text(label="Table schemas", placeholder="Insert your table schemas here"),
51
  gr.Text(label="Specify Task", value="Using valid SQLite, answer the following questions for the tables provided above."),
52
  gr.Text(label="Prompt", placeholder="Put your natural language prompt here"),
53
- gr.Dropdown(["nsql-6B", "nsql-350M"], value="nsql-6B")
54
  ],
55
  outputs="text",
56
  examples=[example1, example2, example3])
 
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 from the 2B and 350M model 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.
 
50
  inputs=[gr.Text(label="Table schemas", placeholder="Insert your table schemas here"),
51
  gr.Text(label="Specify Task", value="Using valid SQLite, answer the following questions for the tables provided above."),
52
  gr.Text(label="Prompt", placeholder="Put your natural language prompt here"),
53
+ gr.Dropdown(["nsql-2B", "nsql-350M"], value="nsql-6B")
54
  ],
55
  outputs="text",
56
  examples=[example1, example2, example3])
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-6B"]
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-6B"]
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-2B"]
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,