GPT-3 tutorial: Trip Scheduler tutorial
In this tutoial we will create simple GPT-3 powered Streamlit service for trip scheduling. We will use GPT-3 to generate trip schedule based on user input. We will use Streamlit to create simple UI for our app.
🚀 Prerequisites
First, we need to install the necessary libraries:
Now we can create .env
file and add our OpenAI API key:
Last thing we need to do is to create main.py
file, import all necessary libraries and load our API key from .env
file:
📝 Creating Streamlit app
Now we can create our Streamlit app. First, we need to create a functions that will generate prompt and trip schedule based on user input:
Now we can create UI for our app with Streamlit:
Let’s create form for user input:
And finally, we can display generated trip schedule:
🚀 Running Streamlit app
Now we can run our app:
🏆 Result
And let’s check results!