Skip to content

Enthuasish/data-explainer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🚀 Data Explainer

Python FastAPI Docker AWS ECS Gemini AI

An AI-powered CSV Insight Generator that transforms raw CSV files into easy-to-understand natural language insights using Google Gemini AI.

Live deployment: https://da-6ebebb3f3d35458fa92b018e22d93ba3.ecs.ap-south-1.on.aws/


📑 Table of Contents


📖 Overview

Data Explainer is a full-stack AI web application that enables users to upload a CSV dataset and instantly receive:

  • 📊 Dataset profiling
  • 📈 Statistical summaries
  • 🔍 Data quality checks
  • 🤖 AI-generated insights in plain English

Instead of sending raw CSV data to the LLM, the application first analyzes the dataset using Pandas, creates a compact statistical summary, and then sends only that summary to Google Gemini AI. This makes the application faster, cheaper, more scalable, and privacy-friendly.


✨ Features

  • 📁 Drag & Drop CSV Upload
  • 📊 Automatic Dataset Profiling
  • 📈 Numeric & Categorical Statistics
  • 🚫 Missing Value Detection
  • 🔄 Duplicate Row Detection
  • 🤖 AI-generated Dataset Explanation
  • ⚡ Real-time Streaming Response (SSE)
  • 🌙 Modern Dark UI
  • 📱 Responsive Design
  • 🐳 Dockerized Deployment
  • ☁️ Hosted on AWS ECS Express Mode

🛠 Tech Stack

Layer Technology
Frontend HTML, CSS, JavaScript
Backend FastAPI, Python
Data Analysis Pandas
AI Model Google Gemini 3.1 Flash Lite
Streaming Server-Sent Events (SSE)
Containerization Docker
Cloud AWS ECS Express Mode
Image Registry Amazon ECR

🏗 Architecture

Browser
    │
    ▼
HTML • CSS • JavaScript
    │
 HTTPS
    │
    ▼
FastAPI Backend
    │
    ├── Pandas Profiling
    │
    └── Gemini API
            │
            ▼
 AI Explanation
            │
            ▼
Real-Time Stream to Browser

📂 Project Structure

data-explainer/

├── backend/
│   ├── main.py
│   └── requirements.txt
│
├── frontend/
│   ├── index.html
│   └── static/
│       ├── style.css
│       └── script.js
│
├── Dockerfile
├── .dockerignore
├── .gitignore
├── .env
└── README.md

⚙️ Installation

Clone Repository

git clone https://github.com/your-username/data-explainer.git

cd data-explainer

Create Virtual Environment

python -m venv venv

Windows

venv\Scripts\activate

Linux / Mac

source venv/bin/activate

Install Dependencies

pip install -r backend/requirements.txt

Configure Environment Variables

Create a .env file

GEMINI_API_KEY=your_api_key_here

Run

uvicorn backend.main:app --reload

Open

http://localhost:8000

🐳 Docker

Build Image

docker build -t data-explainer .

Run Container

docker run -p 8000:8000 data-explainer

☁️ Deployment

The application is deployed using

  • Amazon ECS Express Mode
  • Amazon ECR
  • Docker
  • Google Gemini API

Deployed via Amazon ECS Express Mode rather than AWS App Runner, since App Runner stopped accepting new customers as of April 30, 2026. ECS Express Mode is AWS's current recommended replacement for single-container web app deployments and offers an equivalent one-step deploy flow from an ECR image.


💡 How It Works

  1. The browser uploads a CSV to POST /api/analyze.
  2. The backend computes a compact statistical summary with pandas — row/column counts, per-column types, missing-value percentages, duplicate rows, and numeric or categorical statistics — rather than sending raw rows to the LLM.
  3. That summary is sent to the Gemini API inside a structured prompt (build_prompt() in backend/main.py).
  4. The response streams back to the browser as Server-Sent Events and renders progressively in the UI in real time.

🔐 Security

  • API Keys stored as Environment Variables
  • No secrets committed to GitHub
  • Docker-based isolated deployment
  • Raw datasets are not directly sent to the LLM

🎯 Future Improvements

  • PDF Report Export
  • Interactive Charts
  • Data Visualization Dashboard
  • Multi-file Comparison
  • Download AI Summary
  • User Authentication
  • Support for Excel Files

👥 Team Hope Igniters

Amit Kumar Behera

Asish Amitansu Rout

Aman Sagar Thakur


🎓 Project Information

Built for the "Building & Deploying an AI Web Application on AWS" final project (AICTE GenAI & Cloud Computing Summer Internship 2026, BharatCares / CSRBOX, in collaboration with IBM).

Program

AICTE GenAI & Cloud Computing Summer Internship 2026


⭐ Support

Please consider giving the repository a ⭐ on GitHub.

It motivates us to build more open-source projects.

Releases

Packages

Contributors

Languages