asoria HF staff commited on
Commit
a857a43
·
verified ·
1 Parent(s): d502487

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
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 name with {first_parquet_url} in the generated sql query:
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("sksayril/medicine-info", label="Dataset Name")
119
- query_input = gr.Textbox("How many rows there are?", 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)
 
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)