dots-ocr-parser / README.md
mac
Add comprehensive API documentation with frontend examples
06ccc5a
|
Raw
History Blame Contribute Delete
2.09 kB

A newer version of the Gradio SDK is available: 6.22.0

Upgrade
metadata
title: dots.ocr Parser
emoji: πŸ“„
colorFrom: blue
colorTo: purple
sdk: gradio
sdk_version: 4.44.0
app_file: app.py
pinned: false
license: apache-2.0

DotsOCR Document Parser API

Multilingual document parsing powered by dots.ocr - 1.7B parameter Vision-Language Model for Document Understanding.

Live API: https://isseygino911-dots-ocr-parser.hf.space

πŸš€ Quick Links

⚑ Quick Test

# Test with Python
python test_upload.py your_document.pdf

# Or use cURL
curl -X POST https://isseygino911-dots-ocr-parser.hf.space/api/parse/image \
  -F "file=@image.jpg" \
  -F "prompt_mode=prompt_layout_all_en"

πŸ“– What It Does

  • Extract text from images and PDFs with high accuracy
  • Detect layout - identifies titles, paragraphs, tables, figures, etc.
  • Generate structured output - Markdown + JSON with bounding boxes
  • Process PDFs - Handles multi-page documents automatically
  • Real-time progress - WebSocket and HTTP polling support

πŸ› οΈ Features

  • FastAPI backend with automatic OpenAPI documentation
  • GPU-accelerated processing on HuggingFace Spaces
  • RESTful API with WebSocket support for real-time updates
  • Comprehensive examples for Python, JavaScript, and React
  • Download results as ZIP with annotated images

πŸ“š Documentation

See API_USAGE_GUIDE.md for:

  • Complete API reference
  • Python backend examples
  • JavaScript/React frontend examples
  • Error handling best practices
  • WebSocket integration

πŸ”§ Local Testing

# Clone the repo
git clone https://huggingface.co/spaces/isseygino911/dots-ocr-parser
cd dots-ocr-parser

# Test the API
python test_upload.py test.png

πŸ“„ License

Apache 2.0 - See dots.ocr repository for model license details