LeonceNsh commited on
Commit
8c62fa6
·
verified ·
1 Parent(s): 127764f

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -6
app.py CHANGED
@@ -86,9 +86,9 @@ with gr.Blocks() as demo:
86
 
87
  gr.Markdown("### Click on an example query:")
88
  with gr.Row():
89
- btn_example1 = gr.Button("Calculate the average total_charges, total_cases, and total_days_of_care for each zip_cd_of_residence")
90
- btn_example2 = gr.Button("For each zip_cd_of_residence, calculate the average total_charges per total_case")
91
- btn_example3 = gr.Button("Execute: SELECT * from hsa_data where total_days_of_care > 40 LIMIT 30;")
92
 
93
  query_input = gr.Textbox(
94
  label="Your Query",
@@ -148,15 +148,15 @@ with gr.Blocks() as demo:
148
  )
149
 
150
  btn_example1.click(
151
- fn=lambda: handle_example_click("Calculate the average total_charges, total_cases, and total_days_of_care for each zip_cd_of_residence"),
152
  outputs=[sql_query_out, error_out, results_out, error_out]
153
  )
154
  btn_example2.click(
155
- fn=lambda: handle_example_click("For each zip_cd_of_residence, calculate the average total_charges per total_case"),
156
  outputs=[sql_query_out, error_out, results_out, error_out]
157
  )
158
  btn_example3.click(
159
- fn=lambda: handle_example_click(" SELECT * from hsa_data where total_days_of_care > 40 LIMIT 30;"),
160
  outputs=[sql_query_out, error_out, results_out, error_out]
161
  )
162
 
 
86
 
87
  gr.Markdown("### Click on an example query:")
88
  with gr.Row():
89
+ btn_example1 = gr.Button("Calculate the average total_charges by zip_cd_of_residence")
90
+ btn_example2 = gr.Button("For each zip_cd_of_residence, calculate the sum of total_charges")
91
+ btn_example3 = gr.Button("SELECT * from hsa_data where total_days_of_care > 40 LIMIT 30;")
92
 
93
  query_input = gr.Textbox(
94
  label="Your Query",
 
148
  )
149
 
150
  btn_example1.click(
151
+ fn=lambda: handle_example_click("Calculate the average total_charges by zip_cd_of_residence"),
152
  outputs=[sql_query_out, error_out, results_out, error_out]
153
  )
154
  btn_example2.click(
155
+ fn=lambda: handle_example_click("For each zip_cd_of_residence, calculate the sum of total_charges"),
156
  outputs=[sql_query_out, error_out, results_out, error_out]
157
  )
158
  btn_example3.click(
159
+ fn=lambda: handle_example_click("SELECT * from hsa_data where total_days_of_care > 40 LIMIT 30;"),
160
  outputs=[sql_query_out, error_out, results_out, error_out]
161
  )
162