Auto Generate Python Code Using AI

Khalid Salem
Easy Data
Published in
Aug 20, 2020

Now you can finish your programming assignment in no time!

Imagine having a project that need to be done In a short time or It’s deadline is coming closer, that would be a nightmare for anyone but this might be a good dream with the help of artificial intelligence and NLP, Most of the work will be done using this both techniques let’s see how.

Using natural language processing and artificial intelligence, people developed a model that takes a description of your problem as an input and it generates a python code that solves these problem.

This type of technique can help save time and take shortcuts, But in my opinion I don’t really think it may take a programmer’s place as It don’t have the creative mind of a programmer.

OpenAI Model

OpenAI is one of the famous models that can do these job, It’s a language model which can make lots of other things like generate a dialogue and scripts, this model is developed by microsoft and for this coding purpose they use a technique called generative pre-trained transformer 3 GPT-3, all you have to do is type what you want your code to do and it will generate a code in a second.

You can use their API from here and try it yourself.

https://openai.com/blog/openai-api/

Check out this video to see this model in action.

OpenAI in action

So tell me your opinion about this technique and how it might affect the programming field.

Thank You.

--

--