OpenAI GPT Vision OCR API with Python: Extracting Information from Images

Поділитися
Вставка
  • Опубліковано 4 гру 2024

КОМЕНТАРІ • 11

  • @Data-guy-x8w
    @Data-guy-x8w 4 місяці тому +2

    Thanks for the video! Good results.

  • @allaboutdatatech
    @allaboutdatatech 4 місяці тому +2

    thanks for making this video, with a clear explanation of this topic!

  • @abdulfathah4126
    @abdulfathah4126 2 місяці тому +1

    Thank you. ❤

  • @omarjab
    @omarjab 2 місяці тому +1

    thank you, it works!

  • @michaelvansintjan8536
    @michaelvansintjan8536 2 місяці тому +1

    Excelent video, thanks! Is there a way upload multiple images before asking questions about the text in them?

    • @TechExpertTutorials
      @TechExpertTutorials  2 місяці тому

      Thanks!
      To handle multiple images effectively, you could use the Azure OpenAI GPT4 service and include the BYOD "add your data" option, which can include extracting text from files/images. Then you can ask any questions about any of the files/images. The process would look through the data on all of the files and find the most relevant information. FYI, I plan to have a video out soon that will cover how to set this up.

    • @omarjab
      @omarjab 2 місяці тому +1

      yes, you can, i did it this way:
      content = [{"type": "text", "text": prompt}]
      for filename in os.listdir(images_folder_path):
      if filename.lower().endswith(('.png', '.jpg', '.jpeg', '.gif', '.bmp')):
      filepath = os.path.join(images_folder_path, filename)
      content.append({"type": "image_url", "image_url": {"url": f"data:image/png;base64,{encode_image(filepath)}"}})
      response = client.chat.completions.create(
      model='gpt-4o',
      messages=[{"role": "user", "content": content}],
      max_tokens=500,
      )

    • @omarjab
      @omarjab 2 місяці тому +1

      i don't know if that's what you really need but i hope it works for you

  • @mahirkadic2683
    @mahirkadic2683 4 місяці тому +1

    Hey guys, I have challenging use case. In my country lot of retail stores publish pdfs/images with bunch of products containing, new price old price and name of product alongside image.
    Is there any way I can import images/pdfs and then it returns array of items from that page with mentioned properties.
    Loved your video and keep it coming 🎉

  • @Adilnawazkhan7509
    @Adilnawazkhan7509 20 днів тому

    Is it free?

    • @TechExpertTutorials
      @TechExpertTutorials  19 днів тому

      There used to be a free trial where they give you some credit. Once that credit was used up, you would need to pay to use. I don't see that option on their website any longer. Currently they have a prepayment method, in $5 increments.