

I find it impressive that it is able to create all the files needed to run this application in a coherent manner. Here is a little snippet of ChatGPT’s response to my request: Here is a short video of ChatGPT generating the code I asked for, in real-time. The program should display the calculated BMI with up to 2 decimals.

There should also be a button to switch between metric system and imperial units.

It should take two inputs: height and weight. Write a flask application in python that calculates a user’s BMI. I asked ChatGPT to write a python script using Flask, where users input their height and weight and the application returns their BMI. You can also check this quick video I made about it as well:Įxample: Write a Simple Flask Webapp To Calculate a User’s BMI I will show one example of what ChatGPT can do when asked to write code. You will need to create an account with OpenAI, but it is a quick process. If you want to give it a try yourself, here is the demo page. I have not used GitHub’s Co-Pilot tool, but I imagine it works in a similar way, and both use OpenAI’s technology. The idea is that maybe it will help in cutting down the time needed for boilerplate code. I want to use this section to show one example of how to use ChatGPT to code. There are ways to creatively circumvent those restrictions, such as this Reddit example, or this one. It has also been trained to refuse to answer certain problematic prompts. At the same time, I find the moral judgments and warnings on every response to be annoying sometimes. You can find examples of hilarious responses when you ask it to be creative. Although ChatGPT is a smaller model than GPT-3 ( 20 billion parameters vs 175 billion), it seems to have been fine-tuned and trained for conversation applications. ChatGPT is the latest large-language model from OpenAI. If you have been reading the news lately, you probably heard about ChatGPT at some point. If you are interested in these types of posts, I recently also covered Stable Diffusion, a latent diffusion model that can generate images from a prompt. At the same time, I want to show how it can be used to have fun and help you work on your creative process. I used this AI tool to write a simple Flask application in Python in a matter of minutes. Today I’m writing about ChatGPT and how it can help you with coding.
