Team Ai
Apppublic

bott-wa/multi-ai-document-analysis

sourceHugging Facemitupdated 1y agoView on Hugging Face
0likes
App README

Multi-AI Document Analysis ๐Ÿค–๐Ÿ“„

Compare AWS Textract, Claude AI, and OpenAI GPT-4V for document processing and OCR tasks.

Features

๐Ÿ”ฅ 5 Processing Methods:

  • โ€”AWS Textract (MCP) - Professional OCR with form/table detection
  • โ€”Claude AI (Direct) - Vision + reasoning with Haiku model
  • โ€”OpenAI GPT-4V (Direct) - Advanced vision + reasoning
  • โ€”Hybrid (Textract + Claude) - OCR + AI enhancement
  • โ€”Hybrid (Textract + OpenAI) - OCR + GPT-4V enhancement

๐Ÿ“Š Cost Comparison:

  • โ€”Budget: AWS Textract (~$0.0015/page)
  • โ€”Balanced: Claude Hybrid (~$0.007/document)
  • โ€”Premium: OpenAI Hybrid (~$0.015/document)

โœจ Supported Formats: PNG, JPEG, PDF, TIFF (10MB max)

Setup

To run locally or fork this space:

  1. 1.Add your API keys in the Space settings (or .env file locally):
   AWS_ACCESS_KEY_ID=your_key
   AWS_SECRET_ACCESS_KEY=your_secret  
   AWS_DEFAULT_REGION=us-east-1
   ANTHROPIC_API_KEY=your_anthropic_key
   OPENAI_API_KEY=your_openai_key
  1. 1.Install dependencies:
bash
   pip install -r requirements.txt
  1. 1.Run the app:
bash
   python app.py

Usage

  1. 1.Test Connections: Verify your API keys work
  2. 2.Upload Document: Drop any PDF, image, or form
  3. 3.Select Method: Choose your processing approach
  4. 4.Compare Results: See the differences in output and cost

Architecture

This app demonstrates a multi-AI comparison framework for document analysis:

  • โ€”Direct API integrations (no cloud infrastructure needed)
  • โ€”Structured JSON output for easy integration
  • โ€”Cost and performance benchmarking
  • โ€”Hybrid processing for enhanced accuracy

License

MIT License - feel free to fork and modify!