Update app.py
Browse files
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
|
90 |
-
btn_example2 = gr.Button("For each zip_cd_of_residence, calculate the
|
91 |
-
btn_example3 = gr.Button("
|
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
|
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
|
156 |
outputs=[sql_query_out, error_out, results_out, error_out]
|
157 |
)
|
158 |
btn_example3.click(
|
159 |
-
fn=lambda: handle_example_click("
|
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 |
|