simonliu009 / GPT4o_Vision

Starter code for using GPT4o to extract text from an image

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

GPT4o_Vision

Starter code to use new GPT4o vision API to do extract text from an image. Has a file to generate from an internet accessible URL (InvoiceExtract.py) and from a local copy of an image(InvoiceExtract_LocalFile.py). Step 1: Make sure you have the OpenAI API key environment variable(OPENAI_API_KEY) setup in your environment

Step 2: Install the prerequisite libraries (Just OpenAI for this starter code)

  • pip install -r requirements.txt

Step 3: Run it!

  • python InvoiceExtract.py
  • Should generate a JSON file!

About

Starter code for using GPT4o to extract text from an image


Languages

Language:Python 100.0%