Meena's picture
Update app.py
55ee3d9
raw
history blame
518 Bytes
import pandas as pd
from io import StringIO
import streamlit as st
from app.tapas import execute_query
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:
dataframe = pd.read_csv(uploaded_file)
st.table(dataframe)
query_result, table = execute_query(query, dataframe)
st.write(query_result)
# Can be used wherever a "file-like" object is accepted: