--- 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.*