Metadata-Version: 2.1
Name: ocr-genai-beta
Version: 0.1.3
Summary: A package for performing OCR and interpreting the output using OpenAI and Gemini models.
Home-page: https://github.com/Joshuaatanu/ocr_genAI/tree/main
Author: Joshua Atanu
Author-email: atanu.joshua@gmail.com
License: UNKNOWN
Platform: UNKNOWN
Classifier: Programming Language :: Python :: 3
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Requires-Python: >=3.6
Description-Content-Type: text/markdown

# OCR Package

This Python package allows you to perform OCR on images using Tesseract and interpret the results using generative AI models like OpenAI's GPT and Google's Gemini.

## Installation

To install the package, use:

pip install ocr_genAI

## Usage

```python

from ocr_genai import perform_ocr, interpret_with_openai, interpret_with_gemini


# Replace with your actual image path and API keys
image_path = "image.jpg"  # Ensure this image exists in your directory
openai_api_key = "YOUR_OPENAI_API_KEY"
gemini_api_key = "YOUR_GEMINI_API_KEY"

# Perform OCR
ocr_output = perform_ocr(image_path)
if ocr_output:
    print("OCR Output:\n", ocr_output)

    # Interpret with OpenAI
    openai_response = interpret_with_openai(ocr_output, openai_api_key)
    if openai_response:
        print("OpenAI Response:\n", openai_response)

    # Interpret with Gemini
    gemini_response = interpret_with_gemini(ocr_output, gemini_api_key)
    if gemini_response:
        print("Gemini Response:\n", gemini_response)


