Spaces:
Sleeping
Sleeping
Modified Files
Browse files
app.py
CHANGED
@@ -20,9 +20,6 @@ def get_response(question,prompt):
|
|
20 |
if 'chat_history' not in st.session_state:
|
21 |
st.session_state['chat_history'] = []
|
22 |
|
23 |
-
st.title('Text-SQL Bot')
|
24 |
-
st.sidebar.title("Chat History")
|
25 |
-
|
26 |
# To retreive query from db
|
27 |
def read_sql_query(sql_query,db):
|
28 |
connect = sqlite3.connect(db)
|
@@ -49,10 +46,14 @@ prompt=[
|
|
49 |
"""
|
50 |
]
|
51 |
|
|
|
|
|
|
|
|
|
52 |
st.header('Bot to Retrive SQL Data')
|
53 |
-
question = st.text_input("A",key='input_question',label_visibility='hidden')
|
54 |
|
55 |
-
|
|
|
56 |
|
57 |
if submit:
|
58 |
response = get_response(question,prompt[0])
|
|
|
20 |
if 'chat_history' not in st.session_state:
|
21 |
st.session_state['chat_history'] = []
|
22 |
|
|
|
|
|
|
|
23 |
# To retreive query from db
|
24 |
def read_sql_query(sql_query,db):
|
25 |
connect = sqlite3.connect(db)
|
|
|
46 |
"""
|
47 |
]
|
48 |
|
49 |
+
# Streamlit
|
50 |
+
st.set_page_config(page_title='Text2SQL')
|
51 |
+
st.title('Text2SQL')
|
52 |
+
st.sidebar.title("Chat History")
|
53 |
st.header('Bot to Retrive SQL Data')
|
|
|
54 |
|
55 |
+
question = st.text_input("A",key='input_question',label_visibility='hidden')
|
56 |
+
submit = st.button('Retrieve SQL')
|
57 |
|
58 |
if submit:
|
59 |
response = get_response(question,prompt[0])
|