File size: 780 Bytes
99edfdf
571f16d
43fc99a
99edfdf
28b33b6
99edfdf
07f0cc3
a8c710e
45c3dac
 
 
 
 
 
 
a8c710e
45c3dac
 
 
 
 
 
 
 
 
 
 
 
07f0cc3
f331cd8
55ee3d9
 
 
28b33b6
 
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
import pandas as pd
import torch
from io import StringIO
import streamlit as st
from app.tapas import execute_query


uploaded_file = None

col1, col2 = st.columns(2)

with col1:
     st.header("A cat")
     query = st.text_input(label='Enter your query')
     # st.write('The current movie title is', title)
     uploaded_file = st.file_uploader("Choose a file")
     if uploaded_file is not None:
          expander = st.expander("View Table")     
          expander.write(dataframe)
          # st.table(dataframe)
          
with col2:
     st.header("A dog")
     if uploaded_file is not None:
          dataframe = pd.read_csv(uploaded_file)         
          query_result = execute_query(query, dataframe)
          st.write(query_result)