Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -110,9 +110,8 @@ with gr.Blocks() as demo:
|
|
110 |
gr.Markdown("### Click on an example query:")
|
111 |
with gr.Row():
|
112 |
btn_example1 = gr.Button("Retrieve the top 15 records from contract_data where basetype is Award Notice, awardee has at least 12 characters, and popcity has more than 5 characters. Exclude the fields sub_tier, popzip, awardnumber, basetype, popstate, active, popcountry, type, countrycode, and popstreetaddress")
|
113 |
-
btn_example2 = gr.Button("
|
114 |
-
btn_example3 = gr.Button("
|
115 |
-
btn_example4 = gr.Button("Execute: SELECT * from contract_data LIMIT 10;")
|
116 |
|
117 |
btn_generate_sql = gr.Button("Generate SQL Query")
|
118 |
sql_query_out = gr.Code(label="Generated SQL Query", language="sql")
|
@@ -170,14 +169,10 @@ with gr.Blocks() as demo:
|
|
170 |
outputs=[sql_query_out, error_out, results_out, error_out]
|
171 |
)
|
172 |
btn_example2.click(
|
173 |
-
fn=lambda: handle_example_click("List all contracts in New York"),
|
174 |
-
outputs=[sql_query_out, error_out, results_out, error_out]
|
175 |
-
)
|
176 |
-
btn_example3.click(
|
177 |
fn=lambda: handle_example_click("Show top 5 departments by award amount"),
|
178 |
outputs=[sql_query_out, error_out, results_out, error_out]
|
179 |
)
|
180 |
-
|
181 |
fn=lambda: handle_example_click("SELECT * from contract_data LIMIT 10;"),
|
182 |
outputs=[sql_query_out, error_out, results_out, error_out]
|
183 |
)
|
|
|
110 |
gr.Markdown("### Click on an example query:")
|
111 |
with gr.Row():
|
112 |
btn_example1 = gr.Button("Retrieve the top 15 records from contract_data where basetype is Award Notice, awardee has at least 12 characters, and popcity has more than 5 characters. Exclude the fields sub_tier, popzip, awardnumber, basetype, popstate, active, popcountry, type, countrycode, and popstreetaddress")
|
113 |
+
btn_example2 = gr.Button("Show top 5 departments by award amount")
|
114 |
+
btn_example3 = gr.Button("Execute: SELECT * from contract_data LIMIT 10;")
|
|
|
115 |
|
116 |
btn_generate_sql = gr.Button("Generate SQL Query")
|
117 |
sql_query_out = gr.Code(label="Generated SQL Query", language="sql")
|
|
|
169 |
outputs=[sql_query_out, error_out, results_out, error_out]
|
170 |
)
|
171 |
btn_example2.click(
|
|
|
|
|
|
|
|
|
172 |
fn=lambda: handle_example_click("Show top 5 departments by award amount"),
|
173 |
outputs=[sql_query_out, error_out, results_out, error_out]
|
174 |
)
|
175 |
+
btn_example3.click(
|
176 |
fn=lambda: handle_example_click("SELECT * from contract_data LIMIT 10;"),
|
177 |
outputs=[sql_query_out, error_out, results_out, error_out]
|
178 |
)
|