Use ChatGPT to build large models in seconds! OpenAI's new plug-in is crazy, connect to the code interpreter and get it with one click

WBOY
Release: 2023-04-04 11:30:08
forward
1476 people have browsed it

After ChatGPT can be connected to the Internet, OpenAI also quickly introduced a code generator. With the support of this plug-in, ChatGPT can even generate its own machine learning model.

Last Friday, OpenAI just announced the shocking news that ChatGPT can be connected to the Internet and connected to third-party plug-ins!

In addition to third-party plug-ins, OpenAI also introduced its own plug-in "Code Interpreter" and gave several special use cases: solving quantitative and qualitative mathematical problems; performing data analysis and visualization ;Quickly convert file formats.

In addition, Greg Brockman demonstrated that ChatGPT can also process uploaded video files.

Use ChatGPT to build large models in seconds! OpenAIs new plug-in is crazy, connect to the code interpreter and get it with one click

And a best-selling author named Andrew Mayne, OpenAI's creative application and science communicator, immediately gave it a try - using the Code Inerpreter ) access ChatGPT.

Use ChatGPT to build large models in seconds! OpenAIs new plug-in is crazy, connect to the code interpreter and get it with one click

The feeling is that it is so silky!

When I used ChatGPT to write code, I always needed to take the code out and put it in another environment for testing.

Now, you can develop directly in ChatGPT without leaving the current interface.

As long as we add this code interpreter to the data analysis and drawing functions, an incredibly powerful coding and research tool will be born.

OpenAI’s new plug-in system: code interpreter

Currently, the code interpreter can only run Python on a small number of libraries, and even with the most basic libraries, it There are so many things you can do and it’s very interesting.

Use ChatGPT to build large models in seconds! OpenAIs new plug-in is crazy, connect to the code interpreter and get it with one click

Additionally, in addition to generating code, the Code Interpreter (CI) can analyze the output and use it in another function.

Therefore, we can string different codes together, get the output of one, and then provide it to the other.

This is how this Pac-Man gif is generated: CI uses an algorithm to generate a maze, turns the maze into blocks, uses an algorithm to find the exit, makes it look like Pac-Man, and then generates a gif.

Use ChatGPT to build large models in seconds! OpenAIs new plug-in is crazy, connect to the code interpreter and get it with one click

The following are some examples of Mayne using ChatGPT’s code interpreter plugin to conduct random experiments.

Create a machine learning model (sort of)

Although currently ChatGPT cannot load any machine learning libraries into the code interpreter, we can use n-grams to do some basic statistics Text generation.

In the following example, by providing it with a book, it is asked to create a prediction algorithm and then predict the next word in the text sequence.

GPT uses an n-gram model to generate the algorithm:

Next word prediction is a natural language processing task that can be solved using a language model. A simple way to build a language model is to use an n-gram model.

The n-gram model is a statistics-based language model that predicts the next word based on the previous n-1 words. For example, if we choose n=3 (i.e. ternary model), the model will predict the next word based on the previous two words.

Here is some code to help you build a ternary model from scratch.

Use ChatGPT to build large models in seconds! OpenAIs new plug-in is crazy, connect to the code interpreter and get it with one click

Use ChatGPT to build large models in seconds! OpenAIs new plug-in is crazy, connect to the code interpreter and get it with one click

Voice

Because ChatGPT can understand a lot of mathematical data and CI can generate downloadable files, Mayne Tried using ChatGPT to generate Shepard tones. This is a unique tone that creates the illusion that the pitch is getting higher.

ChatGPT not only successfully completed the task, but also directly generated a wav file using CI.

Use ChatGPT to build large models in seconds! OpenAIs new plug-in is crazy, connect to the code interpreter and get it with one click

Open it and listen to the Sheperd sound, and the feeling is, two words - perfect!

Since the Sheperd tone generated by ChatGPT was so perfect, Mayne went a step further and asked ChatGPT to generate a session of Conway's Game of Life and then convert it to music.

(Conway's Game of Life is a computer program designed by Conway of the University of Cambridge. It is a Turing-complete zero-player game, meaning that its evolution depends on its initial state and requires no further input .)

In the first pass, the music generated by ChatGPT was a bit too casual. Mayne asked it to generate more pleasant music, so ChatGPT applied the pentatonic scale, which sounded really good.

game_of_life_pentatonic_slowAudio: 00:0000:14

ChatGPT’s performance was so good that Mayne was so excited that he had begun to envision an entire mathematical music album , such as (Fibonacci sequence, Mandelbrot set, cellular automata).

He then asked ChatGPT to generate an album cover for the song "Conway Game of Life". Since it was not connected to the DALL-E, Mayne asked it to generate images from simulated frames.

The album cover is as follows.

Use ChatGPT to build large models in seconds! OpenAIs new plug-in is crazy, connect to the code interpreter and get it with one click

QR code

Looking at this album cover, Mayne immediately realized that it might be possible to use ChatGPT to generate a valid QR code.

Use ChatGPT to build large models in seconds! OpenAIs new plug-in is crazy, connect to the code interpreter and get it with one click

Use ChatGPT to build large models in seconds! OpenAIs new plug-in is crazy, connect to the code interpreter and get it with one click

Mayne asked it to generate a QR code for OpenAI’s website, and the result is as follows:

So, can ChatGPT create a Conway Game of Life that ends with a QR code?

Yes, it can.

Use ChatGPT to build large models in seconds! OpenAIs new plug-in is crazy, connect to the code interpreter and get it with one click

Picture

In addition, Mayen found that using OpenCV and a simple facial recognition algorithm (Haar Cascade classifier), CI You can create a function to perform face recognition.

Use ChatGPT to build large models in seconds! OpenAIs new plug-in is crazy, connect to the code interpreter and get it with one click

Using OpenCV for face recognition

Now, ChatGPT can open and read files by itself, which means that in theory it can use this data Generate something new. For example, convert a picture to ASCII form.

Upload pictures:

Use ChatGPT to build large models in seconds! OpenAIs new plug-in is crazy, connect to the code interpreter and get it with one click

Convert to ASCII:

Use ChatGPT to build large models in seconds! OpenAIs new plug-in is crazy, connect to the code interpreter and get it with one click

Generate animation

Through the code interpreter, data can be generated and output into different formats including gif.

First, make it a bouncing block:

Use ChatGPT to build large models in seconds! OpenAIs new plug-in is crazy, connect to the code interpreter and get it with one click

Then the blizzard:

Use ChatGPT to build large models in seconds! OpenAIs new plug-in is crazy, connect to the code interpreter and get it with one click

Continue Next is the "Game of Life", which inspired the QR code simulation experiment.

Use ChatGPT to build large models in seconds! OpenAIs new plug-in is crazy, connect to the code interpreter and get it with one click

#Trying to get the code interpreter to use a vectorized cube to generate a "rotated cube". Before trying other methods, this was the closest I could get:

Use ChatGPT to build large models in seconds! OpenAIs new plug-in is crazy, connect to the code interpreter and get it with one click

OCR

Optical Character Recognition (OCR) is Code Interpretation, Study Says A library in the server. By testing with a screenshot of the website, it can indeed be identified.

Combining OCR with GPT-4, a powerful language model, offers some interesting possibilities for repairing old documents.

Use ChatGPT to build large models in seconds! OpenAIs new plug-in is crazy, connect to the code interpreter and get it with one click

As can be seen from the above figure, OCR can extract part of the text from the entire image, but the result is still incomplete and contains noise.

It seems that OCR may have limitations when dealing with low-quality or distorted images. If you need to get specific information from an image, you'll also need to manually transcribe part of the content.

Use ChatGPT to build large models in seconds! OpenAIs new plug-in is crazy, connect to the code interpreter and get it with one click

Calendar invitation

Although the code interpreter does not have access to the ics library, it can generate a plain text calendar invitation and then let ChatGPT saves it as an .ics file.

Use ChatGPT to build large models in seconds! OpenAIs new plug-in is crazy, connect to the code interpreter and get it with one click

draw

Although there have been some interesting examples of GPT-4 generating scalable vector images (SVG). But I'm still curious about what ChatGPT and the code interpreter can do with simple image blocks.

I asked it to draw a cat and it created something resembling a cat. To make sure it wasn't made from memory, I asked it to draw a blue top hat and pipe. Not quite the top hat I imagined, but still a hat, and blue.

Use ChatGPT to build large models in seconds! OpenAIs new plug-in is crazy, connect to the code interpreter and get it with one click

A cat wearing a hat and smoking a pipe:

Use ChatGPT to build large models in seconds! OpenAIs new plug-in is crazy, connect to the code interpreter and get it with one click

A cat wearing a hat and smoking a pipe Cat" style hat, and a cat smoking a pipe:

Use ChatGPT to build large models in seconds! OpenAIs new plug-in is crazy, connect to the code interpreter and get it with one click

Simulator

I successfully got ChatGPT to generate inner planets using the Matplotlib library Simulation of the track and save it as a gif.

Use ChatGPT to build large models in seconds! OpenAIs new plug-in is crazy, connect to the code interpreter and get it with one click

I then thought about whether I could have ChatGPT simulate a game of checkers, and managed to move the pieces, but not take away the opponent's pieces out of politeness.

Use ChatGPT to build large models in seconds! OpenAIs new plug-in is crazy, connect to the code interpreter and get it with one click

Can you simulate a game of chess? First I asked ChatGPT to create its own board library (a very simple board library with some restrictions and less legal moves...) and then use Unicode to represent the pieces, after which it could simulate the start of a game and convert it Save as .gif file.

Use ChatGPT to build large models in seconds! OpenAIs new plug-in is crazy, connect to the code interpreter and get it with one click

The following is the conversation between me and ChatGPT during the chess simulation. As you can see, I just gave some instructions and ChatGPT and the code interpreter did the rest.

Use ChatGPT to build large models in seconds! OpenAIs new plug-in is crazy, connect to the code interpreter and get it with one click

The above are some explorations of ChatGPT and code interpreter plug-ins by Andrew Mayne.

Netizens commented after reading that LLMs are becoming more and more like real programmers. They can not only suggest code snippets, but also write entire blocks of code, run the code, and output further guidance and feedback to you.

Use ChatGPT to build large models in seconds! OpenAIs new plug-in is crazy, connect to the code interpreter and get it with one click

Some people said that even if they stop what they are doing, they should read this article about the use cases of the GPT-4 code interpreter plug-in. This is completely crazy and will change everything.

Use ChatGPT to build large models in seconds! OpenAIs new plug-in is crazy, connect to the code interpreter and get it with one click

Reference:

https://andrewmayneblog.wordpress.com/2023/03/23/chatgpt-code-interpreter-magic/


##

The above is the detailed content of Use ChatGPT to build large models in seconds! OpenAI's new plug-in is crazy, connect to the code interpreter and get it with one click. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:51cto.com
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!