AIsmart / pages /CSV_Data_Analyzer.py
palitrajarshi's picture
Update pages/CSV_Data_Analyzer.py
256556c
raw history blame
No virus
915 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("πŸ“Š Let's analyze your CSV")
st.subheader("Please upload your CSV file here:")
#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("Upload CSV file",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)