Spaces:
Running
Running
switched back endpoint
Browse files
app.py
CHANGED
@@ -46,6 +46,7 @@ def generate_prompt(question, schema):
|
|
46 |
)
|
47 |
return prompt
|
48 |
|
|
|
49 |
def generate_sql_azure(question, schema):
|
50 |
prompt = generate_prompt(question, schema)
|
51 |
start = time.time()
|
@@ -229,7 +230,7 @@ text_prompt = st.text_input(
|
|
229 |
)
|
230 |
|
231 |
if text_prompt:
|
232 |
-
sql_query =
|
233 |
valid, msg = validate_sql(sql_query, schema)
|
234 |
if not valid:
|
235 |
st.markdown(ERROR_MESSAGE.format(sql_query=sql_query, error_msg=msg))
|
|
|
46 |
)
|
47 |
return prompt
|
48 |
|
49 |
+
|
50 |
def generate_sql_azure(question, schema):
|
51 |
prompt = generate_prompt(question, schema)
|
52 |
start = time.time()
|
|
|
230 |
)
|
231 |
|
232 |
if text_prompt:
|
233 |
+
sql_query = generate_sql(text_prompt, schema)
|
234 |
valid, msg = validate_sql(sql_query, schema)
|
235 |
if not valid:
|
236 |
st.markdown(ERROR_MESSAGE.format(sql_query=sql_query, error_msg=msg))
|