Khachatur Mirijanyan
commited on
Commit
•
b75450f
1
Parent(s):
9eb98fa
Big Small Query
Browse files
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 |
-
|
17 |
-
|
|
|
|
|
18 |
else:
|
19 |
-
return
|
20 |
-
return
|
21 |
|
22 |
def answer_question(query):
|
23 |
query_check = check_query(query)
|
24 |
-
if query_check
|
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')
|