Spaces:
Sleeping
Sleeping
File size: 1,325 Bytes
7364431 59a1211 7364431 59a1211 7364431 03d9fb7 9fa3482 7364431 59a1211 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 | ---
title: Gemini Data Analysis Agent
emoji: π€π
colorFrom: blue
colorTo: indigo
sdk: streamlit
app_file: app.py
license: mit
sdk_version: 1.51.0
---
# π€ 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. **Upload a CSV file** using the file uploader.
2. The app will display the first few rows of your data.
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. 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. Create a [Google AI Studio API key](https://aistudio.google.com/).
2. In your Hugging Face Space **Settings**, go to **Repository secrets**.
3. Add a new secret:
* **Name:** `GEMINI_API_KEY`
* **Value:** (Paste your API key) |