Khachatur Mirijanyan commited on
Commit
b75450f
1 Parent(s): 9eb98fa

Big Small Query

Browse files
Files changed (1) hide show
  1. app.py +8 -5
app.py CHANGED
@@ -12,16 +12,19 @@ def check_query(query):
12
  t_text = split[1]
13
 
14
  if t_text.startswith("### Tables"):
 
15
  tables = t_text.split('\n')
16
- print(tables[1:])
17
- return('big')
 
 
18
  else:
19
- return('error')
20
- return('small')
21
 
22
  def answer_question(query):
23
  query_check = check_query(query)
24
- if query_check == 'big':
25
  return("BIG TABLE")
26
  if query_check == 'small':
27
  return('SMALL TABLE')
 
12
  t_text = split[1]
13
 
14
  if t_text.startswith("### Tables"):
15
+ query_params = dict()
16
  tables = t_text.split('\n')
17
+ query_params['tables'] = tables[1:]
18
+ query_params['q'] = q_text.split('\n')[1]
19
+ print(query_params)
20
+ return query_params
21
  else:
22
+ return 'error'
23
+ return 'small'
24
 
25
  def answer_question(query):
26
  query_check = check_query(query)
27
+ if len(query_check) > 1:
28
  return("BIG TABLE")
29
  if query_check == 'small':
30
  return('SMALL TABLE')