yonkoyonks commited on
Commit
9ee087e
·
verified ·
1 Parent(s): b0f7e79

Upload portfolio3app.py

Browse files
Files changed (1) hide show
  1. src/portfolio3app.py +19 -0
src/portfolio3app.py ADDED
@@ -0,0 +1,19 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import streamlit as st
2
+ import pandas as pd
3
+ from utils import query_agent
4
+
5
+ st.title("📊 Local Data Analysis Assistant")
6
+ st.write("Upload a CSV and ask questions about your data!")
7
+
8
+ uploaded_file = st.file_uploader("Upload CSV", type=["csv"])
9
+
10
+ if uploaded_file:
11
+ df = pd.read_csv(uploaded_file)
12
+ st.dataframe(df.head())
13
+
14
+ query = st.text_input("Ask a question about your dataset:")
15
+ if st.button("Analyze") and query:
16
+ with st.spinner("Thinking..."):
17
+ answer = query_agent(df, query)
18
+ st.subheader("Answer:")
19
+ st.write(answer)