Spaces:
Build error
Build error
Update app.py
Browse files
app.py
CHANGED
|
@@ -80,22 +80,18 @@ def text2sql(dataset_name, query_input):
|
|
| 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.
|
| 84 |
|
| 85 |
### Input:
|
| 86 |
Here is the database schema that the SQL query will run on:
|
| 87 |
{ddl_create}
|
|
|
|
| 88 |
### Question:
|
| 89 |
{query_input}
|
| 90 |
|
| 91 |
### Response (use duckdb shorthand if possible) replace table name with {first_parquet_url} in the generated sql query:
|
| 92 |
"""
|
| 93 |
|
| 94 |
-
text = f"""Given the following SQL table, your job is to write queries given a user’s request.
|
| 95 |
-
{ddl_create}
|
| 96 |
-
Write a SQL query that computes the following request: {query_input}.
|
| 97 |
-
"""
|
| 98 |
-
|
| 99 |
print(text)
|
| 100 |
|
| 101 |
sql_output = query_remote_model(text)
|
|
|
|
| 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.
|
| 84 |
|
| 85 |
### Input:
|
| 86 |
Here is the database schema that the SQL query will run on:
|
| 87 |
{ddl_create}
|
| 88 |
+
|
| 89 |
### Question:
|
| 90 |
{query_input}
|
| 91 |
|
| 92 |
### Response (use duckdb shorthand if possible) replace table name with {first_parquet_url} in the generated sql query:
|
| 93 |
"""
|
| 94 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 95 |
print(text)
|
| 96 |
|
| 97 |
sql_output = query_remote_model(text)
|