Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

CSV Data Quality Analyzer

A modern web application that analyzes CSV files for data quality issues using LLaMA 8B via Ollama. Features a clean, chat-like interface that displays only errors found in your data.

Features

  • 🤖 AI-Powered Analysis: Uses LLaMA 8B model via Ollama for intelligent data quality detection
  • 🎨 Clean UI: Modern, responsive design with intuitive user interface
  • 💬 Chat Interface: Errors displayed in a clean chat-like format
  • 🔍 Smart Filtering: Filter errors by type (Critical, Warning, Info)
  • 📊 Health Score: Visual health score indicator (0-100)
  • Fast Processing: Efficient chunk-based processing for large files

Prerequisites

  1. Python 3.8+ installed
  2. Node.js 16+ and npm installed
  3. Ollama installed and running
  4. LLaMA 8B model installed in Ollama

Installing Ollama and LLaMA 8B

  1. Download and install Ollama from https://ollama.ai
  2. Pull the LLaMA 8B model:
    ollama pull llama3:8b
  3. Verify Ollama is running:
    ollama list

Installation

  1. Install Python dependencies:

    pip install -r requirements.txt
  2. Install Node.js dependencies:

    npm install

Running the Application

Option 1: Using the Batch Script (Windows)

Simply double-click run_app.bat or run:

run_app.bat

Option 2: Manual Start

Terminal 1 - Backend:

python -m uvicorn main:app --reload --host 0.0.0.0 --port 8000

Terminal 2 - Frontend:

npm run dev

The application will be available at:

Usage

  1. Open http://localhost:5173 in your browser
  2. Upload a CSV file by dragging and dropping or clicking to browse
  3. Wait for the analysis to complete (this may take a few moments)
  4. Review the results:
    • Health Score: Overall data quality score (0-100)
    • Error Summary: AI-generated summary of issues found
    • Error Chat: Detailed list of all errors in a chat interface
  5. Filter errors by type using the filter buttons

Project Structure

hackthom-aim-25-main/
├── main.py              # FastAPI backend server
├── services.py          # CSV analysis service using LLaMA 8B
├── requirements.txt     # Python dependencies
├── package.json        # Node.js dependencies
├── vite.config.js      # Vite configuration
├── run_app.bat         # Windows startup script
├── src/
│   ├── main.jsx        # React entry point
│   ├── App.jsx         # Main app component
│   ├── components/
│   │   ├── FileUpload.jsx      # File upload component
│   │   ├── AnalysisSummary.jsx # Results summary component
│   │   └── ErrorChat.jsx       # Error display component
│   └── *.css           # Component styles
└── index.html          # HTML template

How It Works

  1. File Upload: User uploads a CSV file through the web interface
  2. Chunk Processing: The CSV is processed in small chunks (5 rows at a time) to fit LLaMA 8B's context window
  3. AI Analysis: Each chunk is sent to LLaMA 8B via Ollama API for error detection
  4. Error Aggregation: All errors are collected and categorized by severity
  5. Summary Generation: LLaMA 8B generates a user-friendly summary
  6. Display: Results are shown in a clean, chat-like interface

Error Types

  • CRITICAL: Serious data quality issues that need immediate attention
  • WARNING: Potential issues that should be reviewed
  • INFO: Informational messages about data patterns

Troubleshooting

Ollama Connection Error

  • Make sure Ollama is running: ollama serve
  • Verify the model is installed: ollama list
  • Check if Ollama is accessible at http://localhost:11434

Backend Not Starting

  • Check if port 8000 is available
  • Verify Python dependencies are installed: pip install -r requirements.txt

Frontend Not Starting

  • Check if port 5173 is available
  • Verify Node.js dependencies: npm install
  • Clear node_modules and reinstall if needed

Analysis Taking Too Long

  • LLaMA 8B processing can be slow for large files
  • Consider using a GPU-accelerated Ollama setup for better performance
  • Reduce chunk size in services.py if memory is limited

Code Quality

The codebase is designed to be:

  • Easy to Understand: Clear function names, comments, and structure
  • Well-Organized: Separated concerns (backend, frontend, services)
  • Maintainable: Modular components and services

License

See LICENSE file for details.

Contributing

Feel free to submit issues and enhancement requests!

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages