jkbytecrafter's picture
Initial commit: Autonomous Data Analyst
6119e2a
|
Raw History Blame Contribute Delete
5.69 kB
metadata
title: Autonomous Data Analyst
emoji: πŸ€–
colorFrom: blue
colorTo: purple
sdk: docker
app_port: 7860
pinned: false

πŸ€– Autonomous Data Analyst

An AI-Powered, End-to-End Data Science Platform that automates data cleaning, exploratory data analysis, machine learning, and business insight generation β€” powered by LLMs (Gemini, OpenAI, Anthropic).

Python FastAPI Streamlit License: MIT


🌟 Features

Feature Description
πŸ“₯ Data Ingestion Upload CSV, Excel, or JSON files via UI or API
🧹 Intelligent Cleaning Auto-handles missing values, outliers, encoding & scaling
πŸ“Š Automated EDA Rich Plotly dashboards, correlation matrices, distribution plots
πŸ€– AutoML Pipeline Auto-detects classification/regression, trains & compares multiple models
πŸ’‘ AI Insights LLM-powered business insight generation (Gemini / OpenAI)
πŸ’¬ Chat with Data Natural language querying via LangChain code-generation
πŸ“„ Report Generation Auto-generated PDF/HTML analysis reports
πŸ”Œ REST API Full FastAPI backend for programmatic access

πŸ—οΈ Architecture

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚              Streamlit Frontend (app.py)         β”‚
β”‚   Upload β†’ EDA β†’ AutoML β†’ Insights β†’ Chat       β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                   β”‚ HTTP
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β–Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚           FastAPI Backend (app/backend/)         β”‚
β”‚  /upload  /eda  /automl  /insights  /chat       β”‚
β””β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”˜
       β”‚          β”‚          β”‚           β”‚
  app/utils  app/eda   app/automl  app/insights
  (cleaning) (plots)   (PyCaret)   (LangChain)
                                   (Gemini/GPT)

πŸš€ Quickstart

Prerequisites

1. Clone the Repository

git clone https://github.com/<your-username>/autonomous-data-analyst.git
cd autonomous-data-analyst

2. Create a Virtual Environment

python -m venv venv

# Windows
.\venv\Scripts\activate

# macOS / Linux
source venv/bin/activate

3. Install Dependencies

pip install -r requirements.txt

4. Configure Environment Variables

cp .env.example .env

Edit .env and add your API key:

GEMINI_API_KEY=your-gemini-api-key
# Or use OpenAI:
# OPENAI_API_KEY=your-openai-api-key

5. Run the Application

Option A β€” Streamlit UI only:

streamlit run app.py

Open http://localhost:8501

Option B β€” With FastAPI Backend:

# Terminal 1
uvicorn app.backend.main:app --reload

# Terminal 2
streamlit run app.py

6. Run the Demo Pipeline

python demo_pipeline.py

🐳 Docker Compose

docker-compose up --build
  • UI: http://localhost:8501
  • API: http://localhost:8000/docs

πŸ“ Project Structure

autonomous-data-analyst/
β”œβ”€β”€ app.py                  # Streamlit frontend entrypoint
β”œβ”€β”€ demo_pipeline.py        # End-to-end demo script
β”œβ”€β”€ requirements.txt
β”œβ”€β”€ docker-compose.yml
β”œβ”€β”€ .env.example
β”‚
β”œβ”€β”€ app/
β”‚   β”œβ”€β”€ backend/            # FastAPI routes & API logic
β”‚   β”‚   └── api/            # Endpoint modules (automl, eda, etc.)
β”‚   β”œβ”€β”€ automl/             # AutoML engine (PyCaret wrapper)
β”‚   β”œβ”€β”€ eda/                # EDA report generation
β”‚   β”œβ”€β”€ insights/           # LLM insight generation (LangChain)
β”‚   β”œβ”€β”€ llm/                # LLM provider abstraction (Gemini/OpenAI)
β”‚   β”œβ”€β”€ models/             # Saved ML model artifacts
β”‚   β”œβ”€β”€ reports/            # Report generation logic
β”‚   β”œβ”€β”€ ui/                 # Streamlit UI components
β”‚   β”œβ”€β”€ utils/              # Data ingestion, cleaning helpers
β”‚   └── visualization/      # Plotly chart builders
β”‚
β”œβ”€β”€ configs/                # YAML configuration files
β”œβ”€β”€ datasets/               # Sample datasets
β”œβ”€β”€ notebooks/              # Exploration notebooks
└── tests/                  # Unit & integration tests

πŸ› οΈ Tech Stack

Layer Technology
Frontend Streamlit
Backend FastAPI
AutoML PyCaret, Scikit-learn
LLM / AI LangChain, Google Gemini, OpenAI
Visualizations Plotly, Matplotlib, Seaborn
Data Pandas, NumPy
Containerization Docker, Docker Compose

πŸ“ License

This project is licensed under the MIT License β€” see the LICENSE file for details. "# Autonomous-Data-Analyst"