Meena commited on
Commit
45c3dac
1 Parent(s): f331cd8

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +21 -11
app.py CHANGED
@@ -4,19 +4,29 @@ from io import StringIO
4
  import streamlit as st
5
  from app.tapas import execute_query
6
 
7
- query = st.text_input(label='Enter your query')
8
- # st.write('The current movie title is', title)
9
- uploaded_file = st.file_uploader("Choose a file")
10
- if uploaded_file is not None:
11
 
12
- dataframe = pd.read_csv(uploaded_file)
13
-
14
- query_result = execute_query(query, dataframe)
15
- st.write(query_result)
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
16
 
17
- expander = st.expander("View Table")
18
- expander.write(dataframe)
19
- # st.table(dataframe)
20
 
21
 
22
 
 
4
  import streamlit as st
5
  from app.tapas import execute_query
6
 
 
 
 
 
7
 
8
+
9
+ col1, col2 = st.columns(2)
10
+
11
+ with col1:
12
+ st.header("A cat")
13
+ query = st.text_input(label='Enter your query')
14
+ # st.write('The current movie title is', title)
15
+ if uploaded_file is not None:
16
+ uploaded_file = st.file_uploader("Choose a file")
17
+ expander = st.expander("View Table")
18
+ expander.write(dataframe)
19
+ # st.table(dataframe)
20
+
21
+ with col2:
22
+ st.header("A dog")
23
+
24
+ if uploaded_file is not None:
25
+ dataframe = pd.read_csv(uploaded_file)
26
+ query_result = execute_query(query, dataframe)
27
+ st.write(query_result)
28
+
29
 
 
 
 
30
 
31
 
32