Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -104,7 +104,7 @@ with gr.Blocks() as demo:
|
|
104 |
with gr.Row():
|
105 |
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")
|
106 |
btn_example2 = gr.Button("Show top 10 departments by award amount")
|
107 |
-
btn_example3 = gr.Button("
|
108 |
btn_example4 = 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")
|
109 |
btn_example5 = gr.Button("SELECT awardnumber,awarddate,award, office, department_ind_agency,awardee from contract_data WHERE awardee IS NOT NULL AND award IS NOT NULL AND popcity IS NOT NULL AND award > 100000000 LIMIT 10;")
|
110 |
|
@@ -174,7 +174,7 @@ with gr.Blocks() as demo:
|
|
174 |
outputs=[sql_query_out, error_out, results_out, error_out]
|
175 |
)
|
176 |
btn_example3.click(
|
177 |
-
fn=lambda: handle_example_click("SELECT
|
178 |
outputs=[sql_query_out, error_out, results_out, error_out]
|
179 |
)
|
180 |
btn_example4.click(
|
|
|
104 |
with gr.Row():
|
105 |
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")
|
106 |
btn_example2 = gr.Button("Show top 10 departments by award amount")
|
107 |
+
btn_example3 = gr.Button("SELECT department_ind_agency, CONCAT('$', ROUND(SUM(award), 0)) AS sum_award FROM contract_data GROUP BY department_ind_agency ORDER BY SUM(award) DESC LIMIT 25")
|
108 |
btn_example4 = 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")
|
109 |
btn_example5 = gr.Button("SELECT awardnumber,awarddate,award, office, department_ind_agency,awardee from contract_data WHERE awardee IS NOT NULL AND award IS NOT NULL AND popcity IS NOT NULL AND award > 100000000 LIMIT 10;")
|
110 |
|
|
|
174 |
outputs=[sql_query_out, error_out, results_out, error_out]
|
175 |
)
|
176 |
btn_example3.click(
|
177 |
+
fn=lambda: handle_example_click("SELECT department_ind_agency, CONCAT('$', ROUND(SUM(award), 0)) AS sum_award FROM contract_data GROUP BY department_ind_agency ORDER BY SUM(award) DESC LIMIT 25"),
|
178 |
outputs=[sql_query_out, error_out, results_out, error_out]
|
179 |
)
|
180 |
btn_example4.click(
|