Valentines Day is approaching and what better way to celebrate than to play around with AI Completion to create an entire Romantic Comedy movie summary from just a tiny prompt.
This blog was inspired by Janelle Shane’s AI Weirdness blog where she uses GPT-3 models to create all sorts of cool things, most recently AI generated Valentine’s Day cards. So definitely check it out when you can!
GPT-3 stands for Generative Pre-trained Transformer 3 and is essentially a deep learning language model that can produce human-like text. This model was created by Open AI and is so advanced it’s often quoted as producing results indistinguishable to natural human text.
The model is trained on ~40GB of internet text which is how it’s able to easily emulate human text but unfortunately it has learned to emulate toxic internet behaviour which some people noting their chatbots using the GPT-3 model spitting out hate speech, misogynistic, racist and homophobic abuse. So please please use with caution.
Microsoft announced on September 22, 2020, that it had licensed “exclusive” use of GPT-3. This means we can still use the public API to receive an output but don’t have access to the underlying model. Unfortunately, this means it’s not entirely free either. When signing up you get access to $18 worth of free tokens in the first 3 months. I signed up for the free trial and so far, have only used $2 experimenting for this blog so the tokens do go a long way. After the free trial, you can sign up to the pay-as-you-go pricing model as below:
To get started with the free account, you will need to sign up for an OpenAI account here – https://beta.openai.com/
This will give you access to both the Open AI Playground where you can use the model from the browser and the API which you can use locally.
The playground, looks like this:
You can use all the default settings on the right and simply type in a prompt for the model to complete. I used the following prompt: A film about two dinosaurs falling in love
As you can see the model has elaborated on the prompt, I believe inspired by Romantic film ‘A Fault in Our Stars’. It could return more text by extending the default response length of 64 to a larger amount.
You might also note the default Engine is test-davinci-001. Open AI offer 4 engines named Davinci, Babbage, Curie, and Ada.
Of the four, Davinci is the largest and most powerful but also most expensive. Ada is the lowest end of the spectrum but is still highly capable at its lower cost. In this blog, I used the default Da Vinci engine because it’s result for this particular problem were noticeably better but it does mean I am using up my free tokens faster.
So with out further ado, here are my AI generated RomCom’s:
Prompt: A film about a sentient leaf that falls in love with a human.
Da Vinci Response: “The Leaf” is a heartwarming film about a sentient leaf that falls in love with a human. The leaf, who is named Gary, longs to be close to the human he loves, but finds himself struggling to connect with them in the same way that other plants can. Gary must find a way to connect with the human he loves, and learn to express his feelings in a way that they can understand.
Prompt: A film about two strangers who meet on mars and fall in love.
Da Vinci Response: “Strangers on Mars” is a heartwarming film about two people who meet on the red planet and fall in love. Despite the challenges of living in an environment that is completely foreign to them, they find a way to make it work. Their love is tested time and again, but they never give up on each other. Ultimately, they are able to overcome all of the obstacles in their way and live happily ever after.
Prompt: A film about a women and her ex brought back together to create the theme park of their dreams.
Da Vinci Response: I Dream of Disney is a film about a women, named Emily, and her ex-boyfriend, named Ryan, who are brought back together to create the theme park of their dreams. Emily and Ryan were once very happy together, but they eventually broke up due to their busy lives. Now, they are both back in their hometown and they decide to team up to create their dream theme park. However, they soon realize that working together is not as easy as they thought it would be. They have to deal with their past issues and they also have to compete with other theme parks in the area. But, they eventually learn to put their differences aside and they create a theme park that is truly magical.
Some tips if you like to create your own:
Start with ‘a film about’ and keep it short for best results.
Avoid prompts that could be from real films – as GPT-3 is training on real life internet text, it will probably guess the film you are talking about and regurgitate the synopsis of the film and not make up something new.
Keep your response length less than 200 token – you don’t want to use up them too quick!
Please avoid offensive terms and subjects.
Share them with me on Twitter @ToriTompkins, I’d love to hear them!