Creating the GPT Answers user interface
Now let's create a simple web form interface that will let users submit a question to get an answer from our API. We'll start by adding UIkit – a popular lightweight frontend framework that you can learn more about at https://getuikit.com/. We'll also use Axios to make HTTP calls to the app API using a bit of JavaScript.
UIkit will make it easy to create a simple but clean and modern look for our app. You can download UIkit for free from https://getuikit.com. Or you can use a hosted version that is available from https://jsdeliver.com, a free Content Delivery Network (CDN) for open source projects, and that's what we'll be using.
To add UIkit, do the following:
- Open the
public/index.html
file. - Replace the URL for the style sheet with https://cdn.jsdelivr.net/npm/[email protected]/dist/css/uikit.min.css.
- Replace everything between the
<body>
tag and the</body>
tag with the following...