OpenAI has announced the release of the all-new and powerful Code Interpreter for ChatGPT Plus subscribers. You can ask it to run code, generate charts, analyse data, edit and convert files, etc. and it does everything with style.
In this blog post, I will be listing out what you can use the Code Interpreter practically for, with examples. Let’s take a look…
Uses of OpenAI Code Interpreter
I have manually collected these use cases from different users who have shared them on Twitter, Reddit, and on other platforms. This will give you an idea of what people are using the Code Interpreter for, and what you can use it for.
1. Plot mathematical functions
If you’re solving maths and wanted to see what the graph of the function
1/sin(x) looks like. Then simply ask to
plot the function 1/sin(x) and you then have the following image, immediately.
And not just for these simple functions, it can plot graphs for complex mathematical functions as well.
2. To generate QR codes
As OpenAI showed in the official announcement tweet that you can just ask the model to generate a QR code based on the data (URL or any text) that you’re providing, and you have the QR code within seconds. Here’s the tweet:
Imagine, how handy it will be when you have to quickly create a QR code for something. I am definitely going to use it.
3. Convert files from one format to another
Yes, you can upload files in one format and then ask the Code Interpreter to convert them to another format. And I am not just talking about converting PNGs to JPGs, in the below example, the model converted a CSV file into an animating GIF:
Unbelievable! At least, to me.
4. Edit video and GIF files
Yes, you heard that right! You can even upload a video/GIF file and ask the Code Interpreter model to edit as you want, and it does. Here’s a tweet from a user that shows the same:
As of now, it may not do some heavy editing on heavy files, but it’s still pretty impressive. And you can expect it to be better in the next update.
5. Analyse stock options data
I came across a tweet where one person uploaded a large CSV file with stock data and asked the model to output the options with the highest reward and lowest risks. The below tweet shows what the output looked like:
Many people on Reddit have tested it with huge CSV files, and it was pretty quick to analyse and output the information as asked.
You can use it to analyse SEO data, finance files, and much more.
6. OCR text extraction from images
One person uploaded a PNG and asked the model to output all the text in the image as a
.txt file, and it did.
Imagine analysing all those restaurant and mall bills that you click photos of from your smartphone. You can just upload all your bill files, and ask the model to provide you with a nice CSV file.
Seriously, you are only limited by your imagination.
7. Summarize PDFs and other documents
Ethan Mollick shared an example where he provided the model with a huge unformatted data from a PDF and then asked it to summarize. The model was quick and absolutely true in understanding unformatted tables and other stuff. Here’s a tweet that Ethan shared:
It’s definitely going to help me a lot in summarizing research papers and other complicated stuff.
8. Write complex computer programs
And of course, how we can forget its ability to understand and write complex computer programs! A user on Reddit gave the model the following prompt:
I want a simple python app that allows me to use OpenAI APIs to have web-based conversations with ChatGPT. Create the files for me, zip them up, and give me a download link.
Guess what, within seconds, the Code Interpreter returned with
style.css files zipped together.
And not just that, you can even upload your own code files and ask it to add some features or do some modifications.
9. Generate visual charts from data
You can upload your data in CSV or any other format and ask the Code Interpreter to plot a visual graph from it, and it does. There are several examples of people being able to generate meaningful charts from the data. In fact, you don’t even have to provide the data. It can even use public data to quickly give you a graph. For example, just ask to generate a graph of the top 10 countries based on their population, and it does that. Immediately.
For testing, I uploaded a 20-rows of CSV data and asked to generate a chart for each row and let me download as a
.zip file. And it worked, as you see in the screenshot above.
10. Turn images into animated videos
One user tweeted how you can ask the model to generate a simple animated video from a still image, here’s the tweet:
I am sure social media marketers are going to love this thing. Just imagine how easy it would be to put together a quick video for Instagram or TikTok!
11. Analyse complex medical records
I am certain that you’d agree with me on the fact that reading medical records as a normal person is a pain. But the Code Interpreter model can do that for you, easily.
I uploaded a sample medical record and asked the model to summarize it in 100 simple words. And it did, as you can see in the above screenshot.
To further help you understand the capabilities of the model, here are two detailed videos about it from the AI Explained YouTube channel.
The OpenAI Code Interpreter pushes the boundaries of what’s possible with AI, offering a diverse array of utilities, right at your fingertips. From plotting complex mathematical graphs and generating QR codes to file conversion and editing, data analysis, and OCR text extraction, this tool seems to have it all.
The speed, precision, and simplicity it offers not only make tasks simpler but also opens up vistas of creativity and innovation.
The sky is literally the limit!