Today, there is an over-saturation of motivational content, mainly on social media, which renders motivational posters useless. This is a system to generate motivational posters with a touch of irony, addressing the current problem of this kind of content. The outputs of the system are motivational posters which include a background image, retrieved from an image bank, and a phrase that is generated using the technology of ChatGPT. Each poster is singular to each user since there is user input. This work is an exploration of generative systems, using artificial intelligence technologies for the creation of ironic motivational content.
We set out to produce a system that, influenced by some interaction with the user, generates a motivational poster, which includes an image and a phrase on top of that image. The twist here is to actively introduce irony into each poster. The system is a website where the user can generate their poster and can see posters generated by other users.
Our motivation is to create an object that allows someone to generate an infinite number of motivational posters with personalised characteristics and to show that no motivational poster will make a difference if it is buried by thousands of other similar ones. The latter is accentuated by a gallery of all generated posters by every user on the website.
Motivational quotes or posters might work, but there is no relevant research about it. The problem is when there is an overflow of them. They are every- where: in the street, in advertisements, in every Instagram post description and so on. Even if the intention is there, only someone who has never come across any motivational or inspirational phrase will be motivated. Since that is almost impossible, these kinds of posters become white noise. A new poster becomes one more in the sea of thousands, it loses its meaning. It does not matter what is written in the poster, whoever wants to be motivated and is open to it will feel motivated. For those that do not care, it will not make sense.
With this project, we propose to accentuate this overwhelming amount of posters by creating a generator of motivational posters, which will allow us to produce an infinite number of them.
We created a generator of motivational posters which are custom to each user due to the input provided by them. Each poster includes an image and a phrase and the objective is that it will be slightly ironic. The poster generator will be hosted on a website and available to anyone with the URL.
For the generation of the textual part, we use the OpenAI API, ChatGPT, with a predefined template prompt which includes different words for every user. These words are the textual input given directly by the user: before generating the poster, the user is asked to insert two words in the system. To emphasise the sarcastic factor of the project we decided to ask ChatGPT directly for de- motivational quotes, instead of motivational quotes. Besides the quote itself, we also ask ChatGPT to provide the theme of the generated quote.
The prompt that is used to retrieve the motivational phrases is as follows: “Generate a short ironic demotivational quote using your own words about a theme of your choice using the words (keyword 1) and (keyword 2) in it. Max- imum 20 words.” The keywords are what each user inputs to the system. An example of a prompt is: “Generate a short ironic demotivational quote using your own words about a theme of your choice using the words amazing and cat in it. Maximum 20 words.” An example of a response given by ChatGPT is: “Life is amazing, just like watching a cat sleep, except without the nine lives.” In this case, the theme given by ChatGPT to this sentence is “Life”.
We use an image API to get the background images for the posters, more specifically the Pexels API [5]. At the start, we intended to use the words in- putted by the user to query the image API, but we found the relation between image and text became too direct and too literal and ended up deviating from the objective of transmitting irony. Because of this, we ended up using the theme of the quote, provided by ChatGPT, to search for the background image. This way there is still a connection between the image and the quote but it is more subtle and it is not so literal that it becomes boring or redundant. To introduce a bit of randomness in the system, when querying the API for images we ask for 25 different images for a given theme and then select a random one from the list. The way the API works, if we did not do this, posters with similar themes would end up with the same background image.
The system itself is a website where anyone can access and generate motiva- tional posters. For the layout of the poster, we decided to create a parametric system to edit the form and customise the text. For that, we de- veloped a set of buttons and sliders to change the way the text looks, being the editable variables as follows:
- text alignment (left, centre, right)
- text case (upper case, lower case)
- text style (normal, bold, italic)
- font family
- font size
- text colour (white, black, image average colour with border)
- text position (horizontal position, vertical position)
- width of text box
Besides being able to edit each variable individually, we also provide the user with a set of hardcoded templates to choose from.
The user will have the possibility of downloading the output poster for sharing on social media, for example. This is made possible by using the JavaScript library html2canvas, which allows to capture the content of any HTML element and save it as an image. After creating the poster, the user can also save it to the gallery where all these user-generated posters will be accessible. The gallery consists of a big list of all the generated posters as a way to accentuate the large amount there is of this kinds of posters.
We decided to generate the posters as squares, because, even though that is not the format of a regular poster, we gave them these proportions and kept the word poster in the name since it is the most common word used for this kind of motivational content. Today, many of these posters are already square in view of the fact that social media, especially Instagram, is a big part of society and ends up shaping the form of the content created nowadays.
- Node.js
- Express
- OpenAI API
- Pexels API
- Nedb Library
- Html2canvas Library
Project developed within the scope of the Computational Design Laboratory course of the Master's Degree in Design and Multimedia. Faculty of Sciences and Technology of the University of Coimbra.
Author: Sofia Costa, 2024
Oriented by: Tiago Martins, Penousal Machado, João Cunha, Pedro Silva, Sérgio Rebelo