-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.py
More file actions
35 lines (27 loc) · 793 Bytes
/
Copy pathmain.py
File metadata and controls
35 lines (27 loc) · 793 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
from data.db_utils import *
from NLP.parser import *
from GUI.main_ui import *
def taking_question():
"""
Taking input from user to translate it to SQL
"""
while True:
question = input("Please ask your question or type 'quit' to exit: ")
if question.lower() == 'quit' or question.lower() == 'q':
break
query = process(question)
if query:
execute_query(query)
else:
print("Invalid input")
def main():
schema = get_schema_info()
print("List of tables")
print("---------------")
print("--".join(key for key in schema.keys()))
#taking_question()
main_ui = MainGUI(parser= init_parser())
main_ui.run_ui()
print("Ending program")
if __name__ == "__main__":
main()