asoria HF staff commited on
Commit
e2721aa
·
verified ·
1 Parent(s): 54b1e02

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +8 -1
app.py CHANGED
@@ -78,8 +78,9 @@ def text2sql(dataset_name, query_input):
78
  result = con.sql("SELECT sql FROM duckdb_tables() where table_name ='data';").df()
79
 
80
  ddl_create = result.iloc[0,0]
 
81
  text = f"""### Instruction:
82
- Your task is to generate valid duckdb SQL to answer the following question.
83
 
84
  ### Input:
85
  Here is the database schema that the SQL query will run on:
@@ -89,6 +90,12 @@ def text2sql(dataset_name, query_input):
89
 
90
  ### Response (use duckdb shorthand if possible) replace table name with {first_parquet_url} in the generated sql query:
91
  """
 
 
 
 
 
 
92
 
93
  print(text)
94
 
 
78
  result = con.sql("SELECT sql FROM duckdb_tables() where table_name ='data';").df()
79
 
80
  ddl_create = result.iloc[0,0]
81
+ """
82
  text = f"""### Instruction:
83
+ Your task is to generate valid duckdb SQL to answer the following question. Only the SQL query should be returned
84
 
85
  ### Input:
86
  Here is the database schema that the SQL query will run on:
 
90
 
91
  ### Response (use duckdb shorthand if possible) replace table name with {first_parquet_url} in the generated sql query:
92
  """
93
+ """
94
+
95
+ text = f"""Given the following SQL table, your job is to write queries given a user’s request.
96
+ {ddl_create}
97
+ Write a SQL query that computes the following request: {query_input}.
98
+ """
99
 
100
  print(text)
101