Tryfonas's picture
Upload 13 files
95be894 verified
raw
history blame contribute delete
731 Bytes
import streamlit as st
import pandas as pd
from custom_ollama import query_ollama
# App title
st.title("AI-Powered Data Analysis with Local Ollama (FastAPI)")
# Upload dataset
uploaded_file = st.file_uploader("Upload your dataset (CSV)", type=["csv"])
if uploaded_file:
df = pd.read_csv(uploaded_file)
st.write("### Preview of Your Dataset", df.head())
# Run analysis using Ollama
if st.button("Run Data Analysis"):
with st.spinner("Analyzing your data..."):
prompt = f"Perform a basic exploratory data analysis on the following dataset:\n{df.head()}"
response = query_ollama(prompt)
st.success("Analysis complete!")
st.write(response)