Spaces:
Sleeping
Sleeping
File size: 588 Bytes
a40fc91 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 |
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) |