Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -85,7 +85,7 @@ def text2sql(dataset_name, query_input):
|
|
85 |
### Question:
|
86 |
{query_input}
|
87 |
|
88 |
-
### Response (use duckdb shorthand if possible) replace "data" table
|
89 |
"""
|
90 |
try:
|
91 |
sql_output = query_remote_model(text)
|
@@ -115,8 +115,8 @@ with gr.Blocks() as demo:
|
|
115 |
gr.Markdown("# Generate SQL queries based on a given text for your dataset")
|
116 |
gr.Markdown("This space showcase how to generate a SQL query from a text and get the result.")
|
117 |
gr.Markdown("Tech stack: duckdb and DuckDB-NSQL-7B model")
|
118 |
-
dataset_name = gr.Textbox("
|
119 |
-
query_input = gr.Textbox("
|
120 |
btn = gr.Button("Generate SQL")
|
121 |
schema_output = gr.Textbox(label="Parquet Schema as CREATE DDL", interactive= False)
|
122 |
prompt_output = gr.Textbox(label="Generated prompt", interactive= False)
|
|
|
85 |
### Question:
|
86 |
{query_input}
|
87 |
|
88 |
+
### Response (use duckdb shorthand if possible) replace all "data" table references with {first_parquet_url} in the generated sql query:
|
89 |
"""
|
90 |
try:
|
91 |
sql_output = query_remote_model(text)
|
|
|
115 |
gr.Markdown("# Generate SQL queries based on a given text for your dataset")
|
116 |
gr.Markdown("This space showcase how to generate a SQL query from a text and get the result.")
|
117 |
gr.Markdown("Tech stack: duckdb and DuckDB-NSQL-7B model")
|
118 |
+
dataset_name = gr.Textbox("jamescalam/world-cities-geo", label="Dataset Name")
|
119 |
+
query_input = gr.Textbox("Which cities are part of Albania country?", label="Ask something about your data")
|
120 |
btn = gr.Button("Generate SQL")
|
121 |
schema_output = gr.Textbox(label="Parquet Schema as CREATE DDL", interactive= False)
|
122 |
prompt_output = gr.Textbox(label="Generated prompt", interactive= False)
|