Khachatur Mirijanyan commited on
Commit
f422003
1 Parent(s): 6ed7387

Add more sample rows

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -27,7 +27,7 @@ def get_prompt():
27
  Only use the following tables:
28
 
29
  {table_info}
30
-
31
  Question: {input}"""
32
 
33
  PROMPT = PromptTemplate(
@@ -55,12 +55,12 @@ def check_query(query):
55
  def get_db(q, tables):
56
  if len(tables) == 0:
57
  db = SQLDatabase.from_uri("sqlite:///nba_small.db",
58
- sample_rows_in_table_info=3)
59
  else:
60
  tables.extend(DEFAULT_TABLES)
61
  db = SQLDatabase.from_uri("sqlite:///nba.db",
62
  include_tables = tables,
63
- sample_rows_in_table_info=3)
64
  return db
65
  def answer_question(query):
66
  PROMPT = get_prompt()
 
27
  Only use the following tables:
28
 
29
  {table_info}
30
+
31
  Question: {input}"""
32
 
33
  PROMPT = PromptTemplate(
 
55
  def get_db(q, tables):
56
  if len(tables) == 0:
57
  db = SQLDatabase.from_uri("sqlite:///nba_small.db",
58
+ sample_rows_in_table_info=5)
59
  else:
60
  tables.extend(DEFAULT_TABLES)
61
  db = SQLDatabase.from_uri("sqlite:///nba.db",
62
  include_tables = tables,
63
+ sample_rows_in_table_info=5)
64
  return db
65
  def answer_question(query):
66
  PROMPT = get_prompt()