Spaces:
Sleeping
Sleeping
A newer version of the Gradio SDK is available: 6.22.0
metadata
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
Getting Started
Prerequisites
- Python 3.10+
- pip (Python package manager)
Installation
- Clone the repository:
git clone https://github.com/yourusername/personal-data-assistant.git cd personal-data-assistant - Create a virtual environment (optional but recommended):
python -m venv venv source venv/bin/activate # On Windows: venv\Scripts\activate - Install dependencies:
pip install -r requirements.txt - Set up environment variables:
- Create a
.envfile in the project root with your API keys for the model:MISTRAL_API_KEY=your_mistral_api_key
- Create a
Running the App
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_cssinapp.pyto change the UI theme. - Add new tools or models in
main.py.
License
MIT License. See LICENSE for details.
Acknowledgements
Made with β€οΈ for data enthusiasts.