OpenAI GPT-4o vision capabilities are good

OpenAI GPT-4o vision capabilities are good

I hand-drew the above image, then fed it to openAI's new GPT-4o model via its API with a few lines of Python code. This is what the model replied,

from openai import OpenAI 
import os
import cv2
import base64
import time

MODEL="gpt-4o"
client = OpenAI(api_key='YOUR_API_KEY_HERE')


# Path to your local image
image_path = 'geom.png'

# Read the image file in binary mode and encode it to base64
with open(image_path, 'rb') as image_file:
    base64_image = base64.b64encode(image_file.read()).decode('utf-8')

response = client.chat.completions.create(
    model=MODEL,
    messages=[
        {"role": "system", "content": "You are a helpful assistant that responds in Markdown. Help me with my math homework!"},
        {"role": "user", "content": [
            {"type": "text", "text": "What is the value of x in this image?"},
            {"type": "image_url", "image_url": {"url": f"data:image/png;base64,{base64_image}"}
            }
        ]}
    ],
    temperature=0.0,
)
print(response.choices[0].message.content)        
In a parallelogram, opposite angles are equal, and adjacent angles are supplementary (i.e., they add up to 180 degrees).Given:\[\angle A = 3x + 26^\circ\]\[\angle D = 4x + 14^\circ\]Since \(\angle A\) and \(\angle D\) are adjacent angles in the parallelogram, they must add up to 180 degrees:\[(3x + 26^\circ) + (4x + 14^\circ) = 180^\circ\]Combine like terms:\[3x + 4x + 26^\circ + 14^\circ = 180^\circ\]\[7x + 40^\circ = 180^\circ\]Subtract 40 degrees from both sides:\[7x = 140^\circ\]Divide both sides by 7:\[x = 20^\circ\] So, \(x\) is \(20\) degrees.

Pretty impressive!

要查看或添加评论,请登录

Tom Reid的更多文章

  • Free ebook

    Free ebook

    I’ve put an ebook I wrote around seven years ago onto one of my GitHub repos that anyone can download for free. The…

  • Altman talks GPT-5

    Altman talks GPT-5

    Sam Altman recently appeared as a guest at the World Governments Summit, held in the UAE on the 12th-14th of February…

  • Develop scalable AWS Python jobs with Glue, Ray & the SDK for Pandas

    Develop scalable AWS Python jobs with Glue, Ray & the SDK for Pandas

    Introduction To my mind, one of the biggest announcements that came out of AWS re:Invent 2022, and which went largely…

    4 条评论
  • Using Partitioning and Bucketing to improve query performance and reduce costs in AWS Athena

    Using Partitioning and Bucketing to improve query performance and reduce costs in AWS Athena

    Partitioning and bucketing are two techniques that can help improve the performance of queries in Athena, Amazon's…

  • A first look at ChatGPT

    A first look at ChatGPT

    I wrote a brief LinkedIn post earlier today on ChatGPT, saying how clever I thought it was. Having played around with…

  • Run scalable, cost-effective workloads on AWS in parallel using AWS Batch and Step Functions

    Run scalable, cost-effective workloads on AWS in parallel using AWS Batch and Step Functions

    In this article, I'll discuss one of the ways you can run scalable and cost-effective computing workloads on AWS in…

    1 条评论
  • Avoid using apply() on big dataframes

    Avoid using apply() on big dataframes

    I've been using Pandas for a while now, but recently I learned something new which is, if you're dealing with large…

  • Running geospatial queries on AWS Athena

    Running geospatial queries on AWS Athena

    I have been a user of AWS Athena for some time but didn’t know until recently that Athena possesses some nifty built-in…

    3 条评论
  • AWS EMR Serverless

    AWS EMR Serverless

    On June 1st 2022 AWS announced the general availability of serverless Elastic Map Reduce (EMR). Amazon EMR is a cloud…

  • Apache Iceberg tables in AWS Athena

    Apache Iceberg tables in AWS Athena

    Iceberg tables In a recent announcement, AWS introduced the general availability of a new type of table to their…

    1 条评论

社区洞察

其他会员也浏览了