Spaces:
Sleeping
Sleeping
File size: 2,898 Bytes
be36fbe | 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 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 | ---
license: mit
title: A simple Data Analyzer
sdk: gradio
emoji: π
colorFrom: red
pinned: true
thumbnail: >-
https://cdn-uploads.huggingface.co/production/uploads/69848113135d8332da94b363/JFpif40IVp5pJhMZ0-n8x.png
---
# Personal Data Assistant
A simple interactive data analysis and visualization assistant built with Python and Gradio. Ask questions about your datasets, generate insightful visualizations, and get instant answersβall in a beautiful, user-friendly web interface.
![Gradio App Screenshot] (images/image.png)
## Features
- **Conversational Data Analysis**: Chat with the agent to analyze your CSV datasets.
- **Automatic Visualizations**: Instantly generate bar charts and other graphs from your data.
- **Modern UI**: Custom black and red theme for a sleek, professional look.
- **Conversation Logging**: Keeps a log of your questions and the agent's responses.
- **Easy Dataset Upload**: Upload your own CSV files for instant analysis.
## Demo
https://your-demo-link.com
## Getting Started
### Prerequisites
- Python 3.10+
- pip (Python package manager)
### Installation
1. **Clone the repository:**
```bash
git clone https://github.com/yourusername/personal-data-assistant.git
cd personal-data-assistant
```
2. **Create a virtual environment (optional but recommended):**
```bash
python -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate
```
3. **Install dependencies:**
```bash
pip install -r requirements.txt
```
4. **Set up environment variables:**
- Create a `.env` file in the project root with your API keys for the model:
```env
MISTRAL_API_KEY=your_mistral_api_key
```
### Running the App
```bash
python app.py
```
The Gradio interface will launch in your browser.
## Usage
- **Ask questions** about your dataset in natural language.
- **Upload a CSV file** to analyze your own data.
- **View generated graphs** and download them if needed.
## Example Datasets
- `housing_dataset.csv`: Sample housing prices by city.
## Project Structure
```
βββ app.py # Gradio web app
βββ main.py # Core agent logic and tools
βββ housing_dataset.csv # Example dataset
βββ vgsales.csv # Example dataset
βββ conversation_log.txt # Conversation history
βββ .gitignore
βββ .gradio/flagged/ # Gradio flagged data
```
## Technologies Used
- Python
- Gradio
- Matplotlib, Seaborn, Pandas
- smolagents, LiteLLM
## Customization
- Modify `custom_css` in `app.py` to change the UI theme.
- Add new tools or models in `main.py`.
## License
MIT License. See [LICENSE](LICENSE) for details.
## Acknowledgements
- [Gradio](https://gradio.app/)
- [Mistral AI](https://mistral.ai/)
- [smol-ai/smolagents](https://github.com/smol-ai/smolagents)
---
*Made with β€οΈ for data enthusiasts.* |