lhoestq HF staff commited on
Commit
38e9fcc
·
verified ·
1 Parent(s): de23bb0

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -0
app.py CHANGED
@@ -4,6 +4,8 @@ import gradio as gr
4
  con = duckdb.connect(":memory:")
5
 
6
  def greet(SQL_Query):
 
 
7
  return con.sql(SQL_Query).df()
8
 
9
  examples = [
 
4
  con = duckdb.connect(":memory:")
5
 
6
  def greet(SQL_Query):
7
+ if "limit" not in SQL_Query.lower():
8
+ raise gr.Error("You should use the LIMIT clause or it may take too much time to run your query. For example\n\n\tLIMIT 10000")
9
  return con.sql(SQL_Query).df()
10
 
11
  examples = [