Shijun Ju commited on
Commit
9b496cf
1 Parent(s): c1bcba7

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +7 -4
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="EXAMPLE: CREATE TABLE student_course_attendance (student_id VARCHAR); CREATE TABLE students (student_id VARCHAR)"),
26
- gr.Textbox(lines=2, label="Query for", placeholder="EXAMPLE: List the id of students who never attends courses?")
27
  ],
28
- outputs=gr.Textbox(label="Generated SQL Query", placeholder="EXAMPLE OUTPUT: The generated SQL query is: SELECT student_id FROM students WHERE NOT student_id IN (SELECT student_id FROM student_course_attendance)"),
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()