Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -105,6 +105,8 @@ with gr.Blocks() as demo:
|
|
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("Execute: SELECT * from contract_data LIMIT 10;")
|
|
|
|
|
108 |
|
109 |
query_input = gr.Textbox(
|
110 |
label="Your Query",
|
@@ -175,6 +177,16 @@ with gr.Blocks() as demo:
|
|
175 |
fn=lambda: handle_example_click("SELECT * from contract_data LIMIT 10;"),
|
176 |
outputs=[sql_query_out, error_out, results_out, error_out]
|
177 |
)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
178 |
|
179 |
# Launch the Gradio App
|
180 |
demo.launch()
|
|
|
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("Execute: SELECT * from contract_data LIMIT 10;")
|
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 |
|
111 |
query_input = gr.Textbox(
|
112 |
label="Your Query",
|
|
|
177 |
fn=lambda: handle_example_click("SELECT * from contract_data LIMIT 10;"),
|
178 |
outputs=[sql_query_out, error_out, results_out, error_out]
|
179 |
)
|
180 |
+
btn_example4.click(
|
181 |
+
fn=lambda: handle_example_click("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"),
|
182 |
+
outputs=[sql_query_out, error_out, results_out, error_out]
|
183 |
+
)
|
184 |
+
btn_example5.click(
|
185 |
+
fn=lambda: handle_example_click("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;"),
|
186 |
+
outputs=[sql_query_out, error_out, results_out, error_out]
|
187 |
+
)
|
188 |
+
|
189 |
+
|
190 |
|
191 |
# Launch the Gradio App
|
192 |
demo.launch()
|