ocr-mistral-view

command
v0.0.8 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 20, 2025 License: MIT Imports: 15 Imported by: 0

README

OCR Mistral View

A web application to view OCR results from Mistral in a user-friendly, browsable format.

Features

  • View OCR results from Mistral in a web browser
  • Navigate through pages with a page browser
  • Option to view all pages at once
  • Automatic extraction and rendering of images from the OCR results
  • Markdown rendering for text content with support for:
    • Tables (responsive with horizontal scrolling)
    • Code blocks with syntax highlighting
    • Images with proper sizing
    • Links and formatting
    • Lists and headings

Installation

# Clone the repository
git clone https://github.com/go-go-golems/go-go-labs.git
cd go-go-labs/cmd/apps/ocr-mistral-view

# Build the application
go generate ./...
go build

Usage

# Run the application with an input JSON file
./ocr-mistral-view -i path/to/ocr_result.json

# Specify a custom port (default is 8080)
./ocr-mistral-view -i path/to/ocr_result.json -p 8081

Once the application is running, open your web browser and navigate to http://localhost:8080 (or your specified port).

Input JSON Format

The application expects a JSON file in the following format:

{
  "model": "mistral-ocr-2503-completion",
  "pages": [
    {
      "dimensions": {
        "dpi": 200,
        "height": 2200,
        "width": 1700
      },
      "images": [],
      "index": 0,
      "markdown": "# LEVERAGING UNLABELED DATA TO PREDICT OUT-OF-DIST..."
    }
    // More pages...
  ],
  "usage_info": {
    "doc_size_bytes": 3002783,
    "pages_processed": 29
  }
}

License

MIT

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
templ: version: v0.3.833
templ: version: v0.3.833

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL