Team Ai
Apppublic

sanjaystarc/data-analysis-agent-2.0

sourceHugging Facemitupdated 10mo agoView on Hugging Face
1likes
App README

๐Ÿค– Gemini Data Analysis Agent

This is a simple Streamlit application that uses the Google Gemini API and LangChain to create an AI agent.

You can upload any CSV file, and the agent will use a Gemini model to write and execute Python (Pandas) code to answer your questions about the data.

๐Ÿš€ How to Use

  1. 1.Upload a CSV file using the file uploader.
  2. 2.The app will display the first few rows of your data.
  3. 3.Ask a question in the text box (e.g., "How many rows are there?" or "What is the average value in the 'sales' column?").
  4. 4.The agent will analyze the data and provide a plain-English answer.

๐Ÿ› ๏ธ Tech Stack

  • โ€”LLM (Brain): Google Gemini (via langchain-google-genai)
  • โ€”Agent Framework: LangChain (specifically create_pandas_dataframe_agent)
  • โ€”Frontend (UI): Streamlit
  • โ€”Hosting: Hugging Face Spaces

๐Ÿ”‘ Setup

This app requires a Google Gemini API key to function.

  1. 1.Create a Google AI Studio API key.
  2. 2.In your Hugging Face Space Settings, go to Repository secrets.
  3. 3.Add a new secret:
  4. 4.Name: GEMINI_API_KEY
  5. 5.Value: (Paste your API key)