Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -101,18 +101,19 @@ with gr.Blocks() as demo:
|
|
101 |
|
102 |
with gr.Row():
|
103 |
with gr.Column(scale=1):
|
104 |
-
|
105 |
-
label="Your Query",
|
106 |
-
placeholder='e.g., "What are the total awards over 1M in California?"',
|
107 |
-
lines=1
|
108 |
-
)
|
109 |
-
|
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")
|
118 |
btn_execute_query = gr.Button("Execute Query")
|
|
|
101 |
|
102 |
with gr.Row():
|
103 |
with gr.Column(scale=1):
|
104 |
+
|
|
|
|
|
|
|
|
|
|
|
105 |
gr.Markdown("### Click on an example query:")
|
106 |
with gr.Row():
|
107 |
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")
|
108 |
btn_example2 = gr.Button("Show top 5 departments by award amount")
|
109 |
btn_example3 = gr.Button("Execute: SELECT * from contract_data LIMIT 10;")
|
110 |
|
111 |
+
query_input = gr.Textbox(
|
112 |
+
label="Your Query",
|
113 |
+
placeholder='e.g., "What are the total awards over 1M in California?"',
|
114 |
+
lines=1
|
115 |
+
)
|
116 |
+
|
117 |
btn_generate_sql = gr.Button("Generate SQL Query")
|
118 |
sql_query_out = gr.Code(label="Generated SQL Query", language="sql")
|
119 |
btn_execute_query = gr.Button("Execute Query")
|