Shijun Ju
commited on
Commit
•
9b496cf
1
Parent(s):
c1bcba7
Update app.py
Browse files
app.py
CHANGED
@@ -22,11 +22,14 @@ def gradio_interface(tables, query):
|
|
22 |
iface = gr.Interface(
|
23 |
fn=gradio_interface,
|
24 |
inputs=[
|
25 |
-
gr.Textbox(lines=5, label="Context Tables", placeholder="
|
26 |
-
gr.Textbox(lines=2, label="Query
|
27 |
],
|
28 |
-
outputs=gr.Textbox(label="Generated SQL Query", placeholder="
|
29 |
-
title="Text to SQL Generator"
|
|
|
|
|
|
|
30 |
)
|
31 |
|
32 |
iface.launch()
|
|
|
22 |
iface = gr.Interface(
|
23 |
fn=gradio_interface,
|
24 |
inputs=[
|
25 |
+
gr.Textbox(lines=5, label="Context Tables", placeholder="Enter table definitions here..."),
|
26 |
+
gr.Textbox(lines=2, label="Query Description", placeholder="Enter your SQL query here...")
|
27 |
],
|
28 |
+
outputs=gr.Textbox(label="Generated SQL Query", placeholder=""),
|
29 |
+
title="Text to SQL Generator",
|
30 |
+
examples=[
|
31 |
+
["CREATE TABLE student_course_attendance (student_id VARCHAR); CREATE TABLE students (student_id VARCHAR);", "List the id of students who never attends courses?"]
|
32 |
+
]
|
33 |
)
|
34 |
|
35 |
iface.launch()
|