Smart-Apps / pages /CSV_Data_Analyzer.py
palitrajarshi's picture
Update pages/CSV_Data_Analyzer.py
1313c67
raw
history blame
921 Bytes
import streamlit as st
from utils1 import query_agent
st.set_page_config(page_title="Spreadsheet Analyzer")
#st.title("πŸ€– Let's do some analysis on your CSV...")
#st.title("πŸ“ˆπŸ“‰πŸ“Š Let's analyze your CSV...")
st.title("πŸ€– CSV Data Analyzer")
st.subheader("Let's analyze your CSV πŸ“Š")
#st.sidebar.title("😎")
st.sidebar.image('./csv_analysis.png',width=300, use_column_width=True)
# Applying Styling
st.markdown("""
<style>
div.stButton > button:first-child {
background-color: #0099ff;
color:#ffffff;
}
div.stButton > button:hover {
background-color: #00ff00;
color:#FFFFFF;
}
</style>""", unsafe_allow_html=True)
# Capture the CSV file
data = st.file_uploader("Please upload your CSV file here",type="csv")
query = st.text_area("Enter your query πŸ”")
button = st.button("Generate Response")
if button:
# Get Response
answer = query_agent(data,query)
st.write(answer)