Spaces:
Sleeping
Sleeping
| import streamlit as st | |
| import pandas as pd | |
| from utils import query_agent | |
| st.title("📊 Local Data Analysis Assistant") | |
| st.write("Upload a CSV and ask questions about your data!") | |
| uploaded_file = st.file_uploader("Upload CSV", type=["csv"]) | |
| if uploaded_file: | |
| df = pd.read_csv(uploaded_file) | |
| st.dataframe(df.head()) | |
| query = st.text_input("Ask a question about your dataset:") | |
| if st.button("Analyze") and query: | |
| with st.spinner("Thinking..."): | |
| answer = query_agent(df, query) | |
| st.subheader("Answer:") | |
| st.write(answer) |