No menu items!

6 Things You Can Do with ChatGPT’s Code Interpreter

ChatGPT’s Code Interpreter is by far the single most powerful feature available on the ChatGPT platform. Though many don’t realize it, this tool has numerous exciting uses and can do far more than the handful of tasks it’s currently being used for.

So, what exactly can you do with ChatGPT’s Code Interpreter plugin? We’ve put together some of the most useful ways you can use the Code Interpreter plugin right now.

1. Create and Edit Images

You can pull off a lot of interesting image manipulation tricks with ChatGPT’s Code Interpreter. The best part is that you don’t need any special skills to do so, all you need to do is simply describe what you want to do in plain language. The results and options might not be Photoshop grade, but they are usually quite interesting and worth the efforts.

Do you want to change an image to grayscale? Need to split an image into quadrants? How about inverting the colors of an image? There is a long list of interesting things you can try.

All you need to do is upload the image to the Code Interpreter interface and describe in plain language what you want to do. Here are some prompts you can try out for some interesting results:

  • Extract a color palette of all the dominant colors from the attached image.
  • Add the word “Confidential” as a watermark to the top-left corner of the attached image.
  • Detect the faces in the attached image and overlay with a transparent crosshair image.
  • Split the attached image into four quadrants, inverse the colors in the last quadrant, and then put the image back together as one.
  • Animate the attached image with a zoom-in and zoom-out effect.
  • Combine the three attached images into a GIF and add a Zoom-out effect
  • Run face detection on the image and pixelate any face present.

In the example below, we asked ChatGPT to split an image into quadrants and invert the colors on the last quadrant.

Split image into quadrants

In this other example, we uploaded an image and asked ChatGPT to blur out the face in the picture.

Blurring a face using ChatGPT Code Interpreter

Apart from these editing tricks, you can also extract relevant metadata from an image as well. You can specify the specific metadata you want to extract, or you can simply prompt ChatGPT to extract all relevant metadata from the attached image. That’s not all. You can also create an image from scratch using the plugin.

In the example below, we asked ChatGPT via the Code Interpreter to create a word cloud image containing the first names of the last 20 US presidents. It’s not the best of examples, but it gives you an idea of what you can do.

Word cloud created with ChatGPT Code Interpreter

Of course, you can ask it to change the background color or use a different font. There are a lot of ways you play around with images using the Code Interpreter plugin. If you are short of ideas, just upload an image and ask ChatGPT to tell you what tasks it can perform on the image.

2. Create and Edit Videos

Just like images, ChatGPT’s Code Interpreter can also perform manipulation tasks on videos. You can perform simple tasks like extracting metadata from video files or grabbing the frame from a particular timestamp. You can also:

  • Convert videos to GIF.
  • Create a video file with sound from a combination of image files.
  • Split video files into chunks that meet certain specifications.
  • Extract audio from a video file
  • Extract subtitles from a video
  • Compress a video
  • Convert a video from one format to another (e.g from AVI to MP4)

Here’s a snapshot of some of the things you can do with a video using the ChatGPT code interpreter:

Things you can do with a video using ChatGPT Code Interpreter

In the example below, we asked ChatGPT to extract the audio from a small video file, and it did so in just a few seconds. The resulting audio file which was available for download was very crisp and clear.

Extracting audio from a video file with ChatGPT

While the Code Interpreter plugin can perform a lot of video-related operations, practical usage, at least for now, is quite limited due to the limited size of video it can handle. It’s not very clear the maximum size of video files Code Interpreter can handle, but you’ll typically run into memory issues with larger videos. For the best results, use smaller video files, with lower resolutions whenever possible.

3. Create and Modify Audio Files

ChatGPT’s Code Interpreter also has a built-in text-to-speech feature. This means you can write a piece of text and have ChatGPT to convert it to an audio file. Besides that, you can also perform several interesting actions on audio files using the Code Interpreter plugin. You can:

  • Convert audio files from one from format to the other (e.g WAV to MP3)
  • Read and edit metadata/tags of the audio file (like title, artist, album)
  • Change the pitch of an audio file
  • Stitch two audio files together
  • Adjust the sample rate, bit rate, or channels of an audio file
  • Trim an audio to a specific time range.
  • Overlay an audio file with another audio

4. Read, Edit and Create Documents

File handling is undoubtedly one of Code Interpreter’s strongest suits. The capabilities of the Code Interpreter extend far beyond just processing image, audio and video files.

This powerful plugin can also read, generate and edit content in a vast array of document types, including PDFs, Microsoft Word docs, plain text files, RTFs, various spreadsheet formats, and code files like Python (.py) and JavaScript (.js). Code Interpreter currently supports several dozen file formats.

It all boils down to what you want to achieve. You can say, attach a PDF file to your prompt, then ask ChatGPT to read from it, translate the text and create MS Word document with the translation.

Or, read the data from a Word file and then extract specific data meeting a certain criterion to create a spreadsheet file. You can also create graphs, charts and other data visualization elements from documents.

Think of any twist you can encounter in real life usage. If it involves creating or reading from documents of any kind, there’s a good chance the Code Interpreter plugin will be able to deal with it.

5. Write and Analyze Code

If you have large code files you want to make sense of, Code Interpreter is a solid option. You can attach files with several thousand lines of code and simply ask Code Interpreter to tell you what it does, maybe debug it, refactor it, translate to another programming language or perform just about any programming-related task you can think of.

How much more capable is Code Interpreter versus regular ChatGPT when it comes to coding tasks? Well, although the underlying model is still the same, Code Interpreter seems to have a larger context window (or at least tries to simulate it) which means it can handle much more data at a go.

This gives it an important edge, especially in things like programming where code files can sometimes run into hundreds of thousands of lines.

To test just how robust it can get with handling large code files, we downloaded a complete user authentication system from GitHub, uploaded it to Code Interpreter as a zip file and asked it what the project does. It was able to unzip the file, iterate through all the folders and describe what the entire project does with impressive accuracy.

When we asked for a new feature to be added to the project, the plugin could identify all the files that needed changes to add a new feature. When prompted, it could make these changes with no input from our end.

Of course, when tested, the project worked flawlessly after it added the feature. It might run into obstacles sometimes, but undoubtedly, working with a large code base is one of the most useful functionalities of the Code Interpreter feature.

Have an image that contains text you need to copy? Code Interpreter can handle that with ease. Simply upload the image and ask ChatGPT to extract the text. It works great on screenshots, pictures of documents, images with superimposed text, and more.

It can also handle distorted or blurry text as well as text in different fonts, sizes, styles, orientations, and colors. You could, say, ask ChatGPT to create an MS Word document from a scanned copy of a document you uploaded, and you’ll get a result in seconds.

While it is important to recognize that the current capabilities of the Code Interpreter plugin is limited in many ways, the plugin still represents one of the most powerful features available in an AI chatbot anywhere on the internet.

With a few upgrades, especially in the size of files it can load into memory and work with, the Code Interpreter feature will undoubtedly give ChatGPT an edge over any other AI chatbots it currently competes with. And there’s still plenty more you can do with ChatGPT.


How to Use ChatGPT as a Detailed and Interactive Text-Based RPG

OpenAI’s ChatGPT is arguably the most advanced AI currently...

4 New Threats Targeting Macs in 2023 and How to Avoid Them

The past decade has witnessed a drastic change in...

What Are Improper Error Handling Vulnerabilities?

Do you know that little things like the errors...

5 AI-Powered Book Recommendation Sites and Apps to Find Your Next Read

Can ChatGPT find the best next book that you...

What Is Forefront AI and Is It Better Than ChatGPT?

Key Takeaways Forefront AI is an online...