Front of generated virtual postcard.
Back of generated virtual postcard.
Post card prior to message generation
The image text is generated depending on the images uploaded.
We wanted to be able to create a dynamic post-card that would generate a message depending on the images that were uploaded. The postcard would also generate a small text that would show a small message that changes depending on the images uploaded by the user.
What it does
You upload images, and it uses Clarifai's API to look at the images and associate tags to them, the tags were Winter Holiday tags such as Christmas Trees, Family Photos, Pets, and Santa.
How we built it
We built it by first making a python script that could talk to Clarifai's API to upload images and return a response with the associated tags. Then we were able to tag the images so that the postcard message and the images were dynamically inserted depending on the image uploaded. We used html2canvas to take a screenshot of the front of the postcard that is produced, then hid the html so that just the image is displayed to be saved by the user.
Challenges we ran into
It was difficult getting Pillow and Flask to work with the website. Clarifai needed Pillow to interpret the images and it was also needed to change the original postcard.jpg.Pillow was difficult to install on Windows, but was more intuitive on Mac, this was due to the imaging module used in pillow that would not install correctly.
Accomplishments that we're proud of
We were able to have Clarifai successfully tag our photos and could return the tags used to create a dynamic post card. We are proud with the fact that we were able to finish a working product under twelve hours with minimal information about Clarifai and implement Pillow.
What's next for PostCardGeneratorSimulator (PCGS)
Creating more dynamic sentences to be added to the post-card and working with the Clarifai tags to create a better story that is generated depending on the images.
We would like to acknowledge the ease of use Clarifai's API was once pillow was working. It was very easy to feed images to a model to train certain models and the workflow aspect that they implemented was intuitive.
We would also like to wish everyone a happy holidays.